Forum - Frame acquisition - exposure length

From UCLA Miniscope
Jump to: navigation, search
Overview > Miniscope Discussion > DAQ Software/Firmware > Frame acquisition - exposure length Write a reply

When one frame is acquired (at a given frame rate), how long is the LED on (and I guess it is the same as acquisition duration)? Is this somehow controllable/adjustable from the GUI?

Posted by Nikolas on 20 June 2016 at 17:52.

So I measured it explicitly using a photodiode and based on the frame acq. TTL (results below).

However I do not understand why the duty cycle is so different between fps settings. Especially the case of 60 fps seems like a bug.

For duty cycle I calculate : time_light_on / time_between_frames.

10 fps 100 ms between frames 75 ms light on 75% duty cycle

15 fps 66 ms between frames 40 ms light on 60% duty cycle

20 fps 50 ms between frames 20 ms light one 40% duty cycle

30 fps 33 ms between frames 18 ms light on 55% duty cycle

60 fps 17 ms between frames 1 ms light on 6% duty cycle

Posted by Nikolas on 20 June 2016 at 18:56.

Hi Nikolas,

Can you explain in a little more detail how/what you are measuring? When you say "time_light_on" are you referring to the excitation LED? The excitation LED is powered by a constant current source and will always remain on. The 'Exposure' setting adjusts the window of time in the CMOS sensor where the sensor is able to collect light.

Posted by DAharoni (administrator) on 25 June 2016 at 05:03.

Hi Daniel, when you the light at a given intensity the LED light flickers at that given frequency. Of course this makes sense, otherwise there would be constant high intensity light delivery outside of frame acquisition for no reason.

So to test this, I placed the miniscope LED in front of a photodiode while changing the frame rate (and simultaneously recording the frame acq. TTL).

This gave me the above values. To explain it more specifically for one of these settings: For 30 fps, at the moment of a frame acquisition (as defined by a change in the TTL signal), there is an increase in the light intensity that lasts 18 ms. Then light goes down (not completely off, but I guess to the 0% leakage current) for 15 ms and then the next frame ttl comes and simultaneously light intensity increases again.

Now I do not know how 'Exposure' relates to this, but I guess a setting of 255 (i.e. 100%) would imply that the sensor collects light for the full 18 ms of light on (but not for the 15 ms of light off, but perhaps this doesn't matter).

The point though is that from the above values I would expect that either the duty cycle would be the same for all the frame rates (i.e. for 75% duty cycle, for 10 fps there is 75 ms light on, for 60 fps 12.75 ms light on) or the light on duration would be the same for all settings (e.g. 10 ms) and the only thing that changes is the repetition rate (frame rate).

Now in the ideal case, these two settings are independent (and independently controlled), since they affect different aspects of the process.

  • Light on time affects how bright the image is
  • Frame rate affects how often you care to measure the given signal

Of course the brightness you can control by reducing the exposure, but this is not quite the same as controlling the light time, since with the exposure you have to use higher light intensity and you can reduce the light received (but this has negative consequences for the bleaching of the fluorescence), while with controlling the light time, you can optimize this value and you can have 100% exposure (full frame duration).

Am I understanding this process correctly?

Posted by Nikolas on 25 June 2016 at 11:52.

At the link below you can find a .mat file with the actual recording. It is downsampled to 1kHz. First row of the matrix is the photodiode output and the second row the TTL.

Posted by Nikolas on 25 June 2016 at 13:33.