Skip to content

Conversation

@adriente
Copy link
Collaborator

Summary

  • I corrected the implementation of the frame-based cheetah3 control so that it should run smoothly on PyMoDAQ. I adopted a similar style to the Picam PyMoDAQ implementation.
  • To smoothly run the DAQ scan, I used a timer thread so that the camera does start/stop at each step of the scan.
  • I added inputs in the DAQ_viewer, to add file paths to pixel configuration files that are on a remote PC and that are susceptible to change regularly. They are then stored in the config.toml.

Main changes

  • src/pymodaq_plugins_asi/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Cheetah3.py
  • src/pymodaq_plugins_asi/hardware/cheetah3.py

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())
Copy link

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()
Copy link

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'])
Copy link

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)

Copy link

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
Copy link

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_folders

for 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"},
Copy link

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
Copy link

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify: tested on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants