Photometrics / PyVCAM

Python3.X wrapper for Photometrics and QImaging PVCAM based cameras
MIT License
36 stars 17 forks source link

Exposure time with not-integer numbers #42

Closed Rabo98 closed 9 months ago

Rabo98 commented 9 months ago

Hi.

I am acquiring frames with a Prime BSI Express using start_seq() and poll_frame(). I noticed that when the exposure time is an integer number (e.g. 1 ms, 2 ms and so on), everything works fine. The problem is that when I would like to use a not-integer number of milliseconds (e.g. 1.5 ms), I find that the signal is actually lower with respect to the 1 ms case, implying that the exposure time is lower than what expected. I do not know if someone encountered similar problems. I hope you can help me. Thank you very much in advance.

Rabo98 commented 9 months ago

Actually, I looked at the frame rate also. When using exp_time = 2 ms for a 200x200 pixels ROI, the frame rate was more or less 480 fps, but when I used exp_time = 2.5 ms, the frame rate rose to 940 fps (which is the maximum possible frame rate for the camera with a ROI of 200x200 pixels). In case, I could provide more info (settings used, version of the software...)

vondrejPM commented 9 months ago

Hi, I just checked the behavior and I can confirm that I see the same issue. It seems that when using any decimal number such as 1.5ms in start_live, get_frame or poll_frame will result in camera exposure time being set to 0. This explains the fps increase as well as the signal intensity drop. There is a camera property called exp_res which sets the camera exposure resolution. Generally, the possible values are as follows: 0 - milliseconds 1 - microseconds 2 - seconds (if supported by the camera)

If you wish to set any decimal number as exposure time, I would recommend changing the exposure resolution to microseconds and then setting the expose time in microseconds. You can use the following command: cam.exp_res = 1