Code for retinotopic mapping of rat visual cortex using wide-field imaging. Stimulus presentation, data acquisition, and data processing uses custom Python code. All software developed for imaging experiments in the Cox Lab, Harvard University.
NOTE: Current (final) version in cleanup
branch.
Install anaconda. Then, create the conda environment (python2.7)
conda create env -f retino-opencv.yml
source activate retinodev
-
Setup monitor.
python setupMonitor.py
- This will prompt you for information about the monitor. Input the info for each question directly in the command line.
- You will be prompted to save at the end.
-
Run a stimulus protocol with the selected monitor.
python PROTOCOL.py --monitor='MONITORNAME'
If you forget which monitors have been set on the computer, you can use the -h flag to get the list of saved monitor configs:
python PROTOCOL.py -h
-
Neural data will be ignored with the --no-camera option. To save image data, add the --save-images option. If no pvapi camera is found, the default is the built-in camera on the computer. For now, use the png output-format option:
python PROTOCOL.py --monitor='MONITOR-NAME' --save-images --output-format='png' --output-path='DATA-DIR-NAME'
-
For more options, their uses, and default settings, go to help.
python PROTOCOL.py -h
This package uses a phase-encoding paradigm adapted from a number of different studies in mouse visual cortex (1-4). Stimulus parameters were determined experimentally for imaging in rats. In addition to custom code based on previously published methods, we found additional guidance from zhuangjun1981/retinotopic_mapping to be particularly helpful for area segmentation (2-4).
Code contributors Juliana Rhee (julianarhee) Cesar Echavarria (cechava) David Cox (davidcox)
-
Error with 'gcc' during pygame install:
export CC='/usr/bin/gcc'
-
Import error with 'cv2' module:
conda install opencv
-
fwpy
should go somewhere on your path. You can start the psychopy UI by callingfwpy `which psychopyApp.py`
-
Kalatsky VA, Stryker MP (2003) New paradigm for optical imaging: temporally encoded maps of intrinsic signal. Neuron 38:529-545.
-
Garrett ME, Nauhaus I, Marshel JH, Callaway EM (2014) Topography and areal organization of mouse visual cortex. J Neurosci 34:12587-12600.
-
Juavinett AL, Nauhaus I, Garrett ME, Zhuang J, Callaway EM (2017). Automated identification of mouse visual areas with intrinsic signal imaging. Nature Protocols. 12: 32-43.
-
Zhuang J, Ng L, Williams D, Valley M, Li Y, Garrett M, Waters J (2017) An extended retinotopic map of mouse cortex. eLife 6: e18372.