Data and code for Crombie, D., Spacek, M.A., Leibold, C.*, Busse, L.*, (accepted). Spiking activity in the visual thalamus is coupled to pupil dynamics across temporal scales. PLoS Biology. [* shared senior authors]
To generate figures from already processed data, copy the *.pkl
data files out of data/original_cooked/
and data/original_raw
into data/
and then run the corresponding cells in the figures_*.ipynp
Jupyter notebooks. Note that notebook cells should be run in order to avoid variable name conflicts. Figures will by default be stored in the figures/
folder, which also contains sub-folder
Data for this project is stored as pickled Pandas DataFrame objects. The "raw" data files, including pupil_*.pkl
, spikes_*.pkl
, ball_*.pkl
, and trials_*.pkl
, contain minimally-processed data to be used in further analyses.
To re-generate the processed ("cooked") data, run the corresponding *.py
file with the desired arguments.
Note : Because many of the analyses involve randomization (e.g. comparison to random permutations of the data), the original figures may only be exactly reproduced by using the data files from the original_cooked
folder.
The positional argument e_name
specifies the experiment name, and is required for all scripts. It can be one of
Note : Spontaneous and sparse noise experiments are generally analyzed together, but the analysis scripts need to be run separately for each experiment type.
Other arguments may include:
Spike type : --spk_type -s
Time ranges : --tranges -t
Note : the imf_decoding.py
script will automatically look for phasetuning
data from the noopto
time ranges.
Analysis and plotting parameters are stored in parameters.py
. Useful, general-purpose functions are stored in the util.py
module.
Experimental units are defined using a MSEU nomenclature: mouse (the strain, year, and ID of a mouse, e.g. 'PVCre_2020_0001'), series (recording session, during which several experimental stimulation protocols are carried out, e.g. 's01'), experiment (a single experiment, e.g. e01), unit (a putative neuron identified by spike sorting, e.g. 'u10'). Every row in a dataframe typically has some combination of these dentifiers which can be used as an index, and to group or merge the data.
The folloing terms are used interchangeably:
Intrinsic mode function (IMF) == component of pupil dynamics (CPD) == timescale
Characteristic frequency == frequency == timescale
Phase tuning == phase coupling