python-microscope / microscope

Python library for control of microscope devices, supporting hardware triggers and distribution of devices over the network for performance and flexibility.
https://www.python-microscope.org
GNU General Public License v3.0
66 stars 39 forks source link

Adding electronic shuttering mode to cameras #209

Open juliomateoslangerak opened 3 years ago

juliomateoslangerak commented 3 years ago

The experiments in cockpit need to know the type of electronic shuttering mode in the camera to set the right timing for the light sources and get pseudo global exposure. Otherwise, the images are not homogeneously exposed. I have implemented this in the past but changes got lost with the many updates in microscope.

I have now made the changes that add functions to the python-microscope camera to get and set shuttering modes. Apparently some cameras can set the shuttering mode. I added the constants into microscope/init so the different modes can be used in cockpit as well as the changes in experiment to make use of this. Could you have a look into this and merge? This is a real issue with the Zyla cameras. My suggested changes here: https://github.com/juliomateoslangerak/microscope/commit/5ce806325c251b5000b4d3bdfa3b2e5ee103b1f7 https://github.com/juliomateoslangerak/microscope/commit/d32467a0055ad0ba1d319f245b3f8a7cb46dd161 https://github.com/juliomateoslangerak/microscope/commit/18525331884201ce009a8ef8402b2cfcc2d5ae6f

juliomateoslangerak commented 1 year ago

@iandobbie and @carandraug, could you review these changes. They are all in a separate branch I made here https://github.com/juliomateoslangerak/microscope/tree/implement_electronic_shuttering. I discussed this with Ian last meeting and I believe there has been some confusion due to my previous interpretation of the problem. Just to be clarify things. On the microscope side, the camera is having a property 'electronic_shuttering_mode' that is accessed through a getter and setter. It is up to the user (cockpit) to decide how to deal with this information to manage the exposure timings. Do you think this is the right approach?

This is duplicated from #143. I'm reviewing now the related issues in cockpit.