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
67 stars 39 forks source link

pvcam: incomplete readout mode list #193

Open dstoychev opened 3 years ago

dstoychev commented 3 years ago

At the moment, microscope lets you select the readout mode as a combination of speed and gain. This doesn't seem to work very well and the main issue is that not all possible combinations are listed. I think it will be better to list the speed and gain options separately. For example, on the Prime BSI, here are the possible combinations:

Speed Gain
100 MHz CMS (12bit)
100 MHz HDR (16bit)
200 MHz Full well (11-bit)
200 MHz Balanced (11-bit)
200 MHz Sensitivity (11-bit)
carandraug commented 3 years ago

Why are not all possible combinations listed? Reading from the code, I see we are reading all listed in PARAM_READOUT_PORT:

ro_ports = self._params[PARAM_READOUT_PORT].values

I think it will be better to list the speed and gain options separately.

The current interface really expects this to be a single string. Such change would require changes on all other cameras and in Cockpit.

dstoychev commented 2 years ago

I discovered that the problem is that readout hierarchies consist of three levels -- port, speed, and gain -- but we only check the first two. Fixed in https://github.com/dstoychev/microscope/commit/1feb84f99bd54d19a01b71c2dc372b60310e1f5b. This is not compliant with the recommended algorithm from the 3.9.x PVCAM manual, section "Port and Speed Choices".