-
Notifications
You must be signed in to change notification settings - Fork 2
Corrected frame-based Cheetah3 acquisition #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.0.x
Are you sure you want to change the base?
Conversation
| False if initialization failed otherwise True | ||
| """ | ||
| self.controller = self.ini_detector_init(slave_controller = controller, new_controller = Cheetah3() ) | ||
| self.controller = self.ini_detector_init(slave_controller = controller, new_controller = Cheetah3()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use new scheme:
if self.is_master:
self.controller = Cheetah3()
#add the other bits that are below
else:
self.controller = controller
initialized = True| Result | ||
| ------ | ||
| """ | ||
| self.config = Config() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for ease of use you don't have to place the config as a class attribute as it is a Singleton object. It means you can import it anywhere it will always point to the same object.
Then in the usage you can replace:
self.controller.config.config["CHEETAH3"]["file_paths"]['bpc']by
config("CHEETAH3", "file_paths", 'bpc')to obtain the value
| self.controller.config.add_bpc_file(param.value()) | ||
| elif param.name() == 'dacs_file_path' : | ||
| self.controller.config.refresh() | ||
| self.settings.child('file_paths_lists','bpc_file_paths_list').setLimits(self.controller.config.config["CHEETAH3"]["file_paths"]['bpc']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify the call to your config object (see my comment on your cheetah3 python file below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and appply simplification everywhere
| """ | ||
| save_folders = self.config["CHEETAH3"]["file_paths"]['data'] | ||
| save_folders.append(folder_path) | ||
| self.config["CHEETAH3"]["file_paths"]['dacs'] = save_folders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace this by:
self.config["CHEETAH3", "file_paths", "dacs"] = save_foldersfor simplicity
| maintainers = [ | ||
| {name = "Name Surname", email = "myname@test.fr"}, | ||
| #todo: list here all maintainers of your plugin | ||
| {name = "Adrien Teurtrie", email = "adrien.teurtrie@♥cemes.fr"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beware of the strange character
| :target: https://pypi.org/project/pymodaq_plugins_template/ | ||
| :alt: Latest Version | ||
|
|
||
| .. image:: https://readthedocs.org/projects/pymodaq/badge/?version=latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can leave the stuff for pymodaq
| * PyMoDAQ’s version. | ||
| * Operating system’s version. | ||
| * What manufacturer’s drivers should be installed to make this plugin run? | ||
| * PyMoDAQ’s version : 5.1.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify: tested on:
Summary
Main changes