Skip to content

Corrected frame-based Cheetah3 acquisition#1

Merged
adriente merged 5 commits intoPyMoDAQ:5.0.xfrom
adriente:rust_update
Mar 31, 2026
Merged

Corrected frame-based Cheetah3 acquisition#1
adriente merged 5 commits intoPyMoDAQ:5.0.xfrom
adriente:rust_update

Conversation

@adriente
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

pyproject.toml Outdated
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

README.rst Outdated
* 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Specify: tested on:

@adriente adriente merged commit 4e545ae into PyMoDAQ:5.0.x Mar 31, 2026
0 of 24 checks passed
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