Implement the abstract class for cameras
Opened this issue · 6 comments
There is a need to define what the abstract classes need for the cameras. This will help develop us write modular code. Taking inspiration from micromanager here I believe the core properties to implement are the following:
- Snap()
- Get/Set Exposure()
- Get/Set Framerate()
- Get/Set Image size()
- Get/Set Gain()
- Get/Set BitDepth()
- Get/Set Binning()
- Get/Set Trigger()
- Get Min/Max Exposure, Gain, Sensor Size
Please feel free to add more. @AhmetCanSolak @ieivanov @YangLiujames
Camera we are dealing with often have different running mode.. typical light sheet mode or normal rolling shutter mode.. area mode...and the amount delay for each line...
- Snap()
We definitely need such function that can get a single frame at a time. We can call it snap(), or capture(), or anything else people agree on.
- Get/Set Exposure()
+1
- Get/Set Framerate()
I'm not sure about framerate. Many cameras have a fixed framerate for a given exposure and active chip size. Which cameras have framerate attribute that can be set independently with their driver?
- Get/Set Image size()
+1
- Get/Set Gain()
Again, not sure if this generalizes to most cameras. I would love to see some examples from drivers.
- Get/Set BitDepth()
+1
- Get/Set Binning()
+1
- Get/Set Trigger()
+1. Maybe trigger_type instead of Trigger?
- Get Min/Max Exposure, Gain, Sensor Size
+1
Also, a shutter_mode
property makes sense, as @YangLiujames suggested.
My only other suggestion would be a function like list_available_cameras
since many of the camera drivers expose such functionality to check all powered up available cameras.
Get/Set Framerate()
Yes, most cameras have a fixed framerate, but the FLIR and basler have settings for you to change that.
By default and the most used scenario is that the frame rate is always at the highest possible and limited by the exposure time+ readout. I don't really use this , but since the abstract class is to cover most cameras perhaps someone has a use case(?) I am happy if this function does not exist.
Get/Set Trigger()
Trigger type maybe was a very broad term. In my experience setting triggers involves mainly two settings:
- rising/falling edge and if it can overlap
- Triggering single/burst frame
+1 shutter_mode
+1 list_available_cameras
One property I didn't add is:
Get/Set Readout_mode()
I know some cameras like the Andor and the Hamamatsu have the choice of different clock-speeds for readout. I am not aware of the FLIR or Basler having something like that, but I haven't looked closely.
The shutter mode and readout time are somewhat interconnected. I am in favor of keep a Get Framerate() but not Set...since most of the sCMOS don't have that option. These two I found pretty useful as well.
- Triggertype() selector
- Output signal(s)
could you explain what you refer as output signals more @YangLiujames ?
- Tirggertype -- this for external trigger , such as Edge trigger / Global reset edge trigger , Level trigger / Global reset level trigger, Synchronous readout trigger, Start trigger (ORCA flash as an example , see page 48) https://camera.hamamatsu.com/content/dam/hamamatsu-photonics/sites/static/sys/en/manual/C11440-42U30_IM_En.pdf
- Output signal(s)
This select the kind of output that camera send. if there are multiple output ports, we can config each output to different available options, such as , fire all, fire any or read out start/end , page 36
(https://andor.oxinst.com/downloads/uploads/Zyla_hardware_user_guide.pdf)