Designed for point-and-click stimulation of neurons in the view field of the microscope. Coordinates of a pointed location are converted to voltages that drive X and Y deflection of the pulsed laser beam. Other modes of operation are available, including scan of a chosen rectangular area, rapid stimulation of a chosen set of locations in sequence, periodic stimulation, etc. Consists of the following files:
- main GUI
- optostim.fig and optostim.m
- image capturing for two supported imaging modes:
- Cook's Sensicam QE is read by senQE.mexglx (senQE.c)
usual video camera with scion frame grabber is read by scion_read.mexglx (scion_read.c, scionlg3.h), will also want scionlg3 module inserted.
- calibration data files
- optostim_scion.ddt or optostim_sensicam.ddt, again depending on which camera
- calibration GUI called from inside the main GUI
- optostim_calibrate.fig, optostim_calibrate.m, optostim_cal_error.m
Call optostim from Matlab. Amplified intracellular voltage should be connected to CH0 input of the acquisition board. Use CH1 input to measure photocurrent or to monitor triggered real-time feedback (rt_control). On load, pick either 'scion' or 'sensicam' depending on which camera is connected. This recaptures the main image. Corresponding optostim_*.ddt file is required in working directory. Typical setting for 'Sampling' is 10,000 Hz but can do 100,000. Plot at the right is either CH0 or CH1 input as selected, refreshed with every laser command. Other controls and functions:
- Check beam
- point-and-click mode for moving the beam
use only when checking or correcting the calibration/alignment
ND filter required in the beam path to protect the CCD
- scale, X and Y
- calibration functions - don't use unless you have to
X and Y may need adjustment if optics was disturbed
scale only needs adjustment if optics was changed
- Capture image
- refreshes image with newly captured data
also saves .mat file
use when a new patch is established or after X-Y microscope movement
- Refresh Image
- uses stored image data to clear markers
- Pulse
- point-and-click mode for pulsing the beam
click outside the image to exit
[paddings] and [pulse duration] in milliseconds
checkboxes allow to save CH0, CH1 or both, file numbers incremented
[label] is loged in DATE.log file when saving or when [log] is pressed
- Scan
- scans a rectangular area selected with [set area]
scan step in microns, interval between pulses in milliseconds
checkboxes select which aspects of input to save
CH0 input is processed by default if [save CH1] is not checked
label is logged, file number incremented
- Set locations
- pick locations of interest
image view is used by default ([window] 0)
or use a number of any open scan-result figure
- Compare
- cycled stimulation of chosen locations individually
[wait] seconds between pulses
captured traces saved depending on [save] checkboxes
- Sequence
- stimulate chosen locations in sequence
[period] ms between pulses, traces padded to [padding] ms
captured traces saved depending on [save] checkboxes
- Sequence repeat
- runs sequence stimulation periodically every [wait] seconds
captured traces saved depending on [save] checkboxes
- Random test
- cycled stimulation of chosen locations in random order
besides individual stimulations includes [ratio] sequences per round
captured traces saved depending on [save] checkboxes
Postprocessing in Matlab
The following is only good as usage reminder. Check *.m texts for details. Data files of appropriate formats are expected in working directory. In most cases you can omit color spec to load data without plotting.
patch2_image = optostim_image('05-Aug-2005_087_image.mat','gray') % plot captured image
patch2_k1_before = optostim_traces('05-Aug-2005', 160:173, 0, 'i') % plot traces 160 to 173, channel 0
patch2_scan = optostim_tailmax('05-Aug-2005_088_scan.mat') % map scanned signal amplitude
patch2_scan = optostim_delays('05-Aug-2005_088_scan.mat', [-30 0]) % map scanned spike delays
patch2_comp_CC = optostim_compare(''14-Apr-2005'', 7, 8, 4, [2 2 1 1], [3 3 2 2]) % plot 4 cycles for locations set 7
patch2_stdp1 = optostim_plasticity('12-Aug-2005', 549:568, 569:628, 629:648, 0, '20050812 p3 st2'); % plot STDP results
p6_ind_after = optostim_random('25-Aug-2005', 648, 3,10)
optostim_synaptic(patch2_k1_before, patch2_k1_after, '20050805 p1 k1 t1', [50 500])
p2_inj = injected('05-Aug-2005_patch2', 'i')
optostim_markers
ax1 = gca;
ax2 = axes('Position', get(ax1,'Position'), 'YAxisLocation','right','Color','none','YColor','r');
overlayed_line = line(x_values, y_values, 'Color', 'r', 'Parent', ax2 );
Send complaints, comments, suggestions to Artem Starovoytov