ScanImage 2018 : How to Trigger the Shutter Separately from Stop Acquisition

We have a need to excite optogenetically with the 2p beam.

The shutter is opened with Grab, and then later target the beam to the tissue with a start trigger.

The problem is that if we stop acquisition the normal way, we get a shutter trigger that produces a sound and creates an artifact in our data.

Is there a way to stop acquisition separately from triggering the shutter?

 

One way to do this is to completely decouple the shutter from the acquisition.
This can be achieved by changing your Machine Data File (MDF):

In the ResScan section, set:

shutterIDs = [];

 

Now, the shutter(s) don't open anymore when you start scanning.

 

To open the shutter(s) now, you can use the command line:

  • hSI.hShutters.shuttersTransition(1,true);           % to open the first shutter
  • hSI.hShutters.shuttersTransition(1,false);          % to close the first shutter
  • hSI.hShutters.shuttersTransition([],false);           % to close all shutters if more than one is present in the system

 

You can write a User Function that uses these commands to automatically open/close the shutters at any point in your experiment.

 

Useful ScanImage Links:

  1. Machine Data File
  2. User Functions
  3.  Shutters API (hSI.hShutters)