Simultaneous imaging and electrophysiology

Scanbox now allows the possibility of doing simultaneous imaging and electrophysiology.  An external DAQ device, supported by Matlab’s data acquisition toolbox, is need to do this.  In our case, we had an old NI-USB-6221 lying around that we decided to use.

In the present case, we set things up to do patch-clamp recordings from a single channel.  The NI box needs access to the the analog signal (which goes into AI.1) as well as input from the CAM0 signal from Scanbox, which signals the beginning of each microscope frame.  This second signal is required for the alignment of the electrophysiology and imaging data.


All you need to do to use this new feature of Scanbox is edit two lines in the scanbox_config.m file:

sbconfig.ephys = 1; % enable ephys data acquisition
sbconfig.ephysRate = 32000; % sampling rate (samples/sec)

The first variable enables the acquisition of electrophysiology data (set to zero otherwise), and the second variable sets the sampling rate that will be used, in this case 32kHz.

That’s all you need to do…

Now, at the end of your imaging session, you will find an additional file with the suffix “.ephys” containing binary data.  The file consists of a sequence of single-precision floating point number pairs. The first number in the pair is the frame of the microscope at which the sample was taken. The second number is the value of the signal.

The postdoc who requested these features, and who is brave enough to venture into doing patch-clamp and imaging, has promised to get some data soon. An example of the first successful recording will be posted below:



Leave a Reply

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

You are commenting using your 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