Data and code for Crombie et al. "Spiking activity in the visual thalamus is coupled to pupil dynamics across temporal scales"

Laura Busse 8d6c4d10e4 Update 'datacite.yml' 2 月之前
data d6d62510bc Upload missing running data in darkness 2 月之前
figures adf8ef5c48 Upload already made panels and full figures 2 月之前
LICENSE 5a3fca9261 Initial commit 3 月之前
README.md 91393d817a Add more detail to readme 2 月之前
datacite.yml 8d6c4d10e4 Update 'datacite.yml' 2 月之前
figures_main.ipynb 7c9c7fcad1 Fix small bug in Fig2B plotting 2 月之前
figures_supplementary.ipynb 468bb019cd Upload jupyter notebook for supplementary figures 2 月之前
hht.py eaaff4d5d9 Upload analysis scripts 2 月之前
imf_correlation.py eaaff4d5d9 Upload analysis scripts 2 月之前
imf_decoding.py eaaff4d5d9 Upload analysis scripts 2 月之前
parameters.py eaaff4d5d9 Upload analysis scripts 2 月之前
phase_tuning.py eaaff4d5d9 Upload analysis scripts 2 月之前
size_tuning.py eaaff4d5d9 Upload analysis scripts 2 月之前
triggered_spiking.py eaaff4d5d9 Upload analysis scripts 2 月之前
util.py eaaff4d5d9 Upload analysis scripts 2 月之前

README.md

pupil_timescales_dLGN

Data and code for Crombie et al. "Spiking activity in the visual thalamus is coupled to pupil dynamics across temporal scales"

How to

Figures

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

Analyses

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

  • 'spontaneous' : experiments where the monitor displayed a uniform gray screen
  • 'sparsenoise' : experiments with sparse noise visual stimulation
  • 'dark' : experiments where the display monitor was switched off and other sources of illumination were covered
  • 'natmov' : experiments with repeated trial of a naturalistic video clip
  • 'natmov_opto' : experiments with repeated trials of a naturalistic video clip, trials with optogenetic stimulation of V1 PV neurons are interleaved pseudo-randomly

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

  • 'tonicskp' : tonic spikes, i.e. all spikes that are not part of a burst
  • 'burst' : burst events, i.e. the first spike in a burst
  • 'spk' : all spikes, i.e. any spike regardless of whether it is part of a burst or not

Time ranges : --tranges -t

  • 'run' : bouts of locomotion
  • 'sit' : behavioral quiescence (no locomotion)
  • 'nosaccade' : periods with no saccadic eye movements
  • 'noopto' : trials without optogenetic stimulation
  • 'desync' :
  • 'sizematched'

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.

Nomenclature

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').

The folloing terms are used interchangeably:

Intrinsic mode function (IMF) == component of pupil dynamics (CPD) == timescale

  • a component resulting from application of Empirical Mode Decomposition (EMD) to the pupil size timeseries

Characteristic frequency == frequency == timescale

  • the value (1/seconds) used to characterise a CPD by taking the mean amplitude-weighted instantaneous frequency