Multiple channels fast acquisition

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple channels fast acquisition

Dima
 Hello!
 I'm using Thorlabs cCMOS USB camera (quantflux) and 4 LED diodes which are controlled by the LED driver and everything is controlled by the MM.

The goal is to have fast multidimensional acquisition in several channels (it takes about 10 ms to change the illumination using the MM).

The problem is that when I use mmc.startSequenceAcquisition and change diodes intensities, I got mess, because the camera is constantly acquiring data and I cannot synchronize the process (and actually the exposures should be different in different channels).

But when I use snapping ( mmc.snapImage() and mmc.getTaggedImage();  ) the process is VERY slow  (it takes 1 second to get 1 image even at 20ms exposure times).

Could you, please, give me some clues on how I could speed up the process?


Thank you!

Sincerely,

Dmitry Nechipurenko

Ph.D., UPENN


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Multiple channels fast acquisition

AustinBlanco
Set the camera input to use an external trigger, then configure an arduino or similar to deliver the input pulses when the LED is ready. Likely there is a short response delay between when each LED is ready and when the camera wants to snap the next frame, so you’re needing to get the camera to wait ~ 10ms between LED switches. 

Austin Blanco



On Aug 26, 2019, at 12:46 PM, Dmitry Nechipurenko <[hidden email]> wrote:

 Hello!
 I'm using Thorlabs cCMOS USB camera (quantflux) and 4 LED diodes which are controlled by the LED driver and everything is controlled by the MM.

The goal is to have fast multidimensional acquisition in several channels (it takes about 10 ms to change the illumination using the MM).

The problem is that when I use mmc.startSequenceAcquisition and change diodes intensities, I got mess, because the camera is constantly acquiring data and I cannot synchronize the process (and actually the exposures should be different in different channels).

But when I use snapping ( mmc.snapImage() and mmc.getTaggedImage();  ) the process is VERY slow  (it takes 1 second to get 1 image even at 20ms exposure times).

Could you, please, give me some clues on how I could speed up the process?


Thank you!

Sincerely,

Dmitry Nechipurenko

Ph.D., UPENN
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Multiple channels fast acquisition

Dima
Thanks, Austin!

Likely there is a short response delay between when each LED is ready and when the camera wants to snap the next frame, so you’re needing to get the camera to wait ~ 10ms between LED switches.  

If I got your point, this approach would still need to "initialize" camera to acquire data before taking each image (to snap the next frame). What I concluded from other posts is that in cCMOS camera this initialization process is time-consuming - and that might be the problem. Is there any way to make it faster? 

By the way, is it true that there is no way to "get camera to wait" when I use mmc.startSequenceAcquisition ?

Thanks!

Dmitry Nechipurenko 

вт, 27 авг. 2019 г. в 02:27, Austin <[hidden email]>:
Set the camera input to use an external trigger, then configure an arduino or similar to deliver the input pulses when the LED is ready. Likely there is a short response delay between when each LED is ready and when the camera wants to snap the next frame, so you’re needing to get the camera to wait ~ 10ms between LED switches. 

Austin Blanco



On Aug 26, 2019, at 12:46 PM, Dmitry Nechipurenko <[hidden email]> wrote:

 Hello!
 I'm using Thorlabs cCMOS USB camera (quantflux) and 4 LED diodes which are controlled by the LED driver and everything is controlled by the MM.

The goal is to have fast multidimensional acquisition in several channels (it takes about 10 ms to change the illumination using the MM).

The problem is that when I use mmc.startSequenceAcquisition and change diodes intensities, I got mess, because the camera is constantly acquiring data and I cannot synchronize the process (and actually the exposures should be different in different channels).

But when I use snapping ( mmc.snapImage() and mmc.getTaggedImage();  ) the process is VERY slow  (it takes 1 second to get 1 image even at 20ms exposure times).

Could you, please, give me some clues on how I could speed up the process?


Thank you!

Sincerely,

Dmitry Nechipurenko

Ph.D., UPENN
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Multiple channels fast acquisition

AustinBlanco
Hi Dimitry,

Great questions!

OK so consider that there is really no substantial difference between a sequence size of 1 frame, vs a sequence size of 100 frames, OTHER than the # of output frames before a new setup. So in a “snap” example the computer:

1. Configures a list of command strings to send to the camera driver (exposure, binning, readout rate, gain, how many frames to capture, offset etc)
2. Send configuration data to camera driver
3. Camera accepts and processes configuration data
4. Camera begins commanded operation. 

Now the delay seen from snap - snap is steps 1-3. 

When capturing sequences > 1, the camera still gets “set up” via steps 1-3, but then simply repeats the “expose - digitize - expose - digitize operation some # of additional times. 

So in the case of a 100 frame sequence, the setup will still take some time, but frames > 1 should run as fast as the exposure+readout rate of the camera. 
A great example of this working properly is viewing a “live” image. 

So how then do we control when images are taken if the camera is free running? This is where the IO settings on the specific camera are very important. 

So, refer to the camera manual, probably the things you’ll want to search for is the “expose”, “fire” or similar command. 

When the camera is configured to wait for a TTL input, the sequence is still loaded, but the camera will only expose each frame when it receives an input signal from a TTL input. 

Some things to note is that if you don’t have any signal connected when you dial this in, the camera should basically hang, wait for a single,, then time out because it never received anything. 

Another thing to work on is the duration of the “fire” pulse. If the fire pulse length is > exposure, you may run the risk of fire # 1 triggering expose # 2, so be sure to configure a pulse using an arduino or function generator in such  way that the:

digitalWrite(pin, HIGH);
millis( some time < exposure by say 20% ) ;
digitalWrite(pin, LOW);

command will not cause frame 2 to arbitrarily trigger before you want it to. 

Hope this makes sense!


Austin Blanco



On Aug 27, 2019, at 7:02 AM, Dmitry Nechipurenko <[hidden email]> wrote:

Thanks, Austin!

Likely there is a short response delay between when each LED is ready and when the camera wants to snap the next frame, so you’re needing to get the camera to wait ~ 10ms between LED switches.  

If I got your point, this approach would still need to "initialize" camera to acquire data before taking each image (to snap the next frame). What I concluded from other posts is that in cCMOS camera this initialization process is time-consuming - and that might be the problem. Is there any way to make it faster? 

By the way, is it true that there is no way to "get camera to wait" when I use mmc.startSequenceAcquisition ?

Thanks!

Dmitry Nechipurenko 

вт, 27 авг. 2019 г. в 02:27, Austin <[hidden email]>:
Set the camera input to use an external trigger, then configure an arduino or similar to deliver the input pulses when the LED is ready. Likely there is a short response delay between when each LED is ready and when the camera wants to snap the next frame, so you’re needing to get the camera to wait ~ 10ms between LED switches. 

Austin Blanco



On Aug 26, 2019, at 12:46 PM, Dmitry Nechipurenko <[hidden email]> wrote:

 Hello!
 I'm using Thorlabs cCMOS USB camera (quantflux) and 4 LED diodes which are controlled by the LED driver and everything is controlled by the MM.

The goal is to have fast multidimensional acquisition in several channels (it takes about 10 ms to change the illumination using the MM).

The problem is that when I use mmc.startSequenceAcquisition and change diodes intensities, I got mess, because the camera is constantly acquiring data and I cannot synchronize the process (and actually the exposures should be different in different channels).

But when I use snapping ( mmc.snapImage() and mmc.getTaggedImage();  ) the process is VERY slow  (it takes 1 second to get 1 image even at 20ms exposure times).

Could you, please, give me some clues on how I could speed up the process?


Thank you!

Sincerely,

Dmitry Nechipurenko

Ph.D., UPENN
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Multiple channels fast acquisition

Dima
Hello, Austin!

Thank you for such a quick and detailed response!

I hope I understood everything correctly! I will try to contact Thorlabs and find out the details on this external triggering mode!

Thank you again!

Sincerely,

Dmitry



вт, 27 авг. 2019 г. в 19:51, Austin <[hidden email]>:
Hi Dimitry,

Great questions!

OK so consider that there is really no substantial difference between a sequence size of 1 frame, vs a sequence size of 100 frames, OTHER than the # of output frames before a new setup. So in a “snap” example the computer:

1. Configures a list of command strings to send to the camera driver (exposure, binning, readout rate, gain, how many frames to capture, offset etc)
2. Send configuration data to camera driver
3. Camera accepts and processes configuration data
4. Camera begins commanded operation. 

Now the delay seen from snap - snap is steps 1-3. 

When capturing sequences > 1, the camera still gets “set up” via steps 1-3, but then simply repeats the “expose - digitize - expose - digitize operation some # of additional times. 

So in the case of a 100 frame sequence, the setup will still take some time, but frames > 1 should run as fast as the exposure+readout rate of the camera. 
A great example of this working properly is viewing a “live” image. 

So how then do we control when images are taken if the camera is free running? This is where the IO settings on the specific camera are very important. 

So, refer to the camera manual, probably the things you’ll want to search for is the “expose”, “fire” or similar command. 

When the camera is configured to wait for a TTL input, the sequence is still loaded, but the camera will only expose each frame when it receives an input signal from a TTL input. 

Some things to note is that if you don’t have any signal connected when you dial this in, the camera should basically hang, wait for a single,, then time out because it never received anything. 

Another thing to work on is the duration of the “fire” pulse. If the fire pulse length is > exposure, you may run the risk of fire # 1 triggering expose # 2, so be sure to configure a pulse using an arduino or function generator in such  way that the:

digitalWrite(pin, HIGH);
millis( some time < exposure by say 20% ) ;
digitalWrite(pin, LOW);

command will not cause frame 2 to arbitrarily trigger before you want it to. 

Hope this makes sense!


Austin Blanco



On Aug 27, 2019, at 7:02 AM, Dmitry Nechipurenko <[hidden email]> wrote:

Thanks, Austin!

Likely there is a short response delay between when each LED is ready and when the camera wants to snap the next frame, so you’re needing to get the camera to wait ~ 10ms between LED switches.  

If I got your point, this approach would still need to "initialize" camera to acquire data before taking each image (to snap the next frame). What I concluded from other posts is that in cCMOS camera this initialization process is time-consuming - and that might be the problem. Is there any way to make it faster? 

By the way, is it true that there is no way to "get camera to wait" when I use mmc.startSequenceAcquisition ?

Thanks!

Dmitry Nechipurenko 

вт, 27 авг. 2019 г. в 02:27, Austin <[hidden email]>:
Set the camera input to use an external trigger, then configure an arduino or similar to deliver the input pulses when the LED is ready. Likely there is a short response delay between when each LED is ready and when the camera wants to snap the next frame, so you’re needing to get the camera to wait ~ 10ms between LED switches. 

Austin Blanco



On Aug 26, 2019, at 12:46 PM, Dmitry Nechipurenko <[hidden email]> wrote:

 Hello!
 I'm using Thorlabs cCMOS USB camera (quantflux) and 4 LED diodes which are controlled by the LED driver and everything is controlled by the MM.

The goal is to have fast multidimensional acquisition in several channels (it takes about 10 ms to change the illumination using the MM).

The problem is that when I use mmc.startSequenceAcquisition and change diodes intensities, I got mess, because the camera is constantly acquiring data and I cannot synchronize the process (and actually the exposures should be different in different channels).

But when I use snapping ( mmc.snapImage() and mmc.getTaggedImage();  ) the process is VERY slow  (it takes 1 second to get 1 image even at 20ms exposure times).

Could you, please, give me some clues on how I could speed up the process?


Thank you!

Sincerely,

Dmitry Nechipurenko

Ph.D., UPENN
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general