Blanking the laser between trials

Sometimes, during long behavioral sessions, it is advantageous to turn off the laser between trials to minimize damage while keeping the microscope scanning.  To do this without introducing any additional noise that may influence the behavioral state we use the Pockels cell.  Scanbox now allows one to blank the laser by sending a command over the network.  The following piece of code will, for example, turn the laser on and off every 2 sec.

open_sbserver % open connection to Scanbox server
while true
send_sbserver('L0'); pause(1); %blank laser
send_sbserver('L1'); pause(1); % turn it back on
end

And the laser power will be modulated without any interruption in the operation of the microscope:

 

 

 

 

3 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s