Andor SDK3 check if exposing?

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

Andor SDK3 check if exposing?

Cordelia Berz
Hi,  

We use an Andor Zyla 4.2 camera with the Andor SDK3 device adapter. I'm new
to micromanager and I'm writing a script where I'd like an action to happen
once the camera has finished exposing, but the camera is being triggered
externally from micromanager. I tried just checking if the camera is busy,
but this always returns false.
Is there a function in the Andor SDK3 library to check if the camera is
exposing or not? Something similar to FireAny or FireAll?
If there is such a function, how can I access the Andor SDK3 library
functions from the script panel?  

Thank you,  
Cordelia



--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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: Andor SDK3 check if exposing?

Nico Stuurman-2
Hi Cordelia,

> We use an Andor Zyla 4.2 camera with the Andor SDK3 device adapter. I'm new
> to micromanager and I'm writing a script where I'd like an action to happen
> once the camera has finished exposing, but the camera is being triggered
> externally from micromanager. I tried just checking if the camera is busy,
> but this always returns false.

It would help if you could describe what exactly you try to accomplish. 
For instance, it sounds like your camera is being triggered internally
(not externally) by Micro-Manager.  If you script your acquisition, and
use the core.SnapImage() function, then you know that the exposure is
finished once that functions finished executing.


> Is there a function in the Andor SDK3 library to check if the camera is
> exposing or not? Something similar to FireAny or FireAll?
> If there is such a function, how can I access the Andor SDK3 library
> functions from the script panel?

There is no access to the Andor SDK from within Micro-Manager, as the
prime goal of the application is to abstract access to the hardware. 
You have access to the core (the "hardware" interface:
https://valelab4.ucsf.edu/~MM/doc/mmcorej/mmcorej/CMMCore.html), and to
the UI layer (in mm 1.4:
https://valelab4.ucsf.edu/~MM/doc/mmstudio/org/micromanager/api/ScriptInterface.html).

If you want to work completely externally from Micro-Manager (not sure
why, what is your preferred programming environment?), then you could
read out the Fire signals from the camera on an external digital IO
device, and query its state from your program.

Best,

Nico



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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: Andor SDK3 check if exposing?

Cordelia Berz
Hi Nico, 

Thank you very much for your reply!
Our camera is set up and controlled in micromanager, but is triggered
externally by an external device. The triggering has to be external due to
our setup. 
This external triggering seems to cause SnapImage() not to acquire an image
at the specific moment when we call SnapImage() but to provide us with an
old image. I think this is because the camera acquires all images at the
beginning due to the faster external triggering and just reloads them when
we use SnapImage(). 
How can we ensure that we snap a single image at a specific time point (but
keeping external triggering)? How to erase the images of the previous time
points from the camera? 

Thank you, 
Cordelia 



--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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: Andor SDK3 check if exposing?

Nico Stuurman-2
Hi Cordelia,
> Our camera is set up and controlled in micromanager, but is triggered
> externally by an external device. The triggering has to be external due to
> our setup.
> This external triggering seems to cause SnapImage() not to acquire an image
> at the specific moment when we call SnapImage() but to provide us with an
> old image.
> I think this is because the camera acquires all images at the
> beginning due to the faster external triggering and just reloads them when
> we use SnapImage().

What exactly is happening?  It sounds like you send a bunch of external
triggers to the camera at the beginning of your experiment, but you do
not want the images that you triggered.  Why send those triggers?

I assume that the AndorSDK3 has some kind of buffer that keeps old
images, but I have no idea how that works.  You can go through the code
(https://github.com/micro-manager/micro-manager/tree/master/DeviceAdapters/AndorSDK3)
yourself, or contact Andor or Open Imaging for help to figure this out.

> How can we ensure that we snap a single image at a specific time point (but
> keeping external triggering)? How to erase the images of the previous time
> points from the camera?

If you really can not avoid sending those early triggers that you
actually do not want, I would write a BeanShell script that starts a
sequence acquisition, discards all images that are present, then inserts
new images to a data set.


Best,

Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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: Andor SDK3 check if exposing?

JonD
Administrator
Hi Cordelia and Nico,


Nico Stuurman-2 wrote
> If you really can not avoid sending those early triggers that you
> actually do not want, I would write a BeanShell script that starts a
> sequence acquisition, discards all images that are present, then inserts
> new images to a data set.

Another untested brainstorm: instead of using SnapImage() you could put the
camera in live mode (even if it is being externally triggered) and then use
getLastTaggedImage() in your script to get the newest/latest image that the
camera has returned.  Related post:
http://micro-manager.3463995.n2.nabble.com/getLastTaggedImage-and-obtaining-the-circular-buffer-s-newest-image-td7588014.html.

-------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: (541) 461-8181 x118
-------------------------------------------



--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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: Andor SDK3 check if exposing?

Cordelia Berz
Hi Nico and Jon,

Thank you very much for your suggestions!
We've now tried using getLastTaggedImage() and it worked fine for our setup.

Thank you for your help,

Cordelia



--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general