#fip multifiber A minimal GUI for doing frame-projected independent-fiber photometry
See paper in Nature Methods for details:
Kim, C., Yang, S., Pichamoorthy, N., Young, N., Kauvar, I., Jennings, J., Lerner, T., Berndt, A., Lee, S.Y., Ramakrishnan, C., Davidson, T., Inoue, M., Bito, H., & Deisseroth, K. (2016). Simultaneous fast measurement of circuit dynamics at multiple sites across the mammalian brain. Nature Methods.
Frame-projected independent-fiber photometry records the sum fluorescence from each of several optical fibers by imaging the fiber bundle onto a camera sensor and digitally cropping and summing the fluorescence from each fiber. Alternating excitation wavelengths for successive frames enables concurrent sampling of multiple spectral channels and/or optical stimulation.
Hardware setup description
The software synchronizes various hardware (light sources, camera acquisition, behavoral apparatuses) by using digital and analog output voltage waveforms and reads image frames from the camera. The measure camera signal from each fiber position can be processed, visualized and accessed in real-time, and saved to hard disk for later analysis. In addition, simultaneous analog input recording is enabled.
Up to 4 analog output waveforms can be user-defined for controlling behavoral apparatuses and other hardware.
The software is based on MATLAB's GUI interface and Image and Data Acquisition toolboxes.
Note: It may be possible to modify the software to work with other MATLAB-supported cameras and DAQ cards.
- Hamamatsu Orca Flash4.0 V2
- National Instruments DAQ Card (PCIe-6343-X and BNC-2090A/BNC-2110)
- PC to support the above hardware -- see Hamamatsu PC Recommendations
- MATLAB (tested with R2013b, R2014b, R2015a, R2015b)
- MATLAB Image Acquisition toolbox and adaptor for camera. The Image Acquisition toolbox may require the Image Processing toolbox.
- MATLAB Data Acquisition toolbox
Installation and configuration
- Ensure the camera and DAQ hardware are accessible using their provided software (e.g. HCImage Live).
- Ensure the MATLAB toolboxes and camera adaptor are installed (see above).
- In the GUI, select the counter channels to correspond to the physical DAQ connections.
Real-time data access
In the GUI, select a call-back function, e.g.
User-defined analog output voltage waveforms
sample_generate_ao_waveform_stim.m to produce an example waveform file, then in the GUI, select that waveform
Implementation detail: the digital counter waveforms and analog output waveforms are in the same Session object, so the synchronization will be consistent across acquisition sessions. However, the precise synchronization may be different with different versions of MATLAB (e.g. R2013b to R2015b and possibly more). Use analog input recording to verify the accuracy of any synchronization, and adjust the analog output waveform accordingly (e.g. set
Analog input recording
Ensure the desired physical connections are made to the DAQ analog input channels. Then, in the GUI, enable the checkbox for analog input recording. A
.csv file will be saved along with the other acquisition data. Visualize the recorded data by using the GUI button or
A note about maximum acquisition rate
The maximum acquisition rate may depend on several factors:
- The camera readout time. For the Orca's bidirectional center-outwards rolling shutter, the camera readout time is set by the minimum of the distance from the farthest row from the center to the center of the image sensor, and the distance between the two most-distant rows.
- (Untested but likely) time it takes callback function to run
- (Untested but likely) efficiency of live plotting
tests/directory contains tests for checking each hardware component separately.
- If the GUI crashes during initialization, there may be a problen with the configurations that FIPGUI persists between sessions. Try running
rmpref('FIPGUI')at the Matlab command line and try again.
- If the camera acquisition cannot keep up, as a last resort, try increasing