DOI: 10.5061/dryad.crjdfn394
title: Data from: Beyond rhythm - a framework for understanding the frequency spectrum of neural activity

description: Cognitive and behavioral processes are often accompanied by changes within
 well-defined frequency bands of the local field potential (LFP i.e., the
 voltage induced by neuronal activity). These changes are detectable in the
 frequency domain using the Fourier transform and are often interpreted as
 neuronal oscillations. However, aside some well-known exceptions, the
 processes underlying such changes are difficult to track in time, making
 their oscillatory nature hard to verify. In addition, many non-periodic
 neural processes can also have spectra that emphasize specific
 frequencies. Thus, the notion that spectral changes reflect oscillations
 is likely too restrictive. In this study, we use a simple yet versatile
 framework to understand the frequency spectra of neural recordings. Using
 simulations, we derive the Fourier spectra of periodic, quasi-periodic and
 non-periodic neural processes having diverse waveforms, illustrating how
 these attributes shape their spectral signatures. We then show how neural
 processes sum their energy in the local field potential in simulated and
 real-world recording scenarios. We find that the spectral power of neural
 processes is essentially determined by two aspects: 1) the distribution of
 neural events in time and 2) the waveform of the voltage induced by single
 neural events. Taken together, this work guides the interpretation of the
 Fourier spectrum of neural recordings and indicates that power increases
 in specific frequency bands do not necessarily reflect periodic neural
 activity.
description: # Beyond Rhythm - A framework for understanding the frequency
 spectrum of neural activity<br><br>The present data set
 comprises an example neural recording and 8 matlab scripts that were used
 to generate the figures of a manuscript entitled *Beyond rhythm – A
 framework for understanding the frequency spectrum of neural activity* by
 Quentin Perrenoud and Jessica A. Cardin. This manuscript was accepted for
 publication in the journal *Frontiers in Systems Neuroscience* on August
 14th 2023. The scripts can be used to reproduce the figures of the article
 and perform simulations illustrating how the temporal distribution and
 waveform of neural processes influence their Fourier Spectrum.
 ## Description of the data and file structure
 The data set comprises a recording of the activity of the mouse
 visual cortex performed with a 16 contact multi-electrode array
 (Neuronexus A16 probe) spaced 50um apart and implanted vertically through
 cortical layers. This recording was part of larger study which is detailed
 in the following preprint (https://doi.org/10.1101/2022.05.13.491832).
 This recording is stored in the zip file: **2019-09-20_10-32-27_1**.This
 file contains two .mat files: 
 -*PCP_L4_MakeMetaDataStructure.mat*: <br>This file a
 structure **sCFG** containing curated recording data with the following
 fields: <br>    -**sPARAM**: a structure containing the parameters
 that were used to generated the currated data (CAN BE IGNORED)<br> 
   -**sREC**: a structure containing general information about the
 recording (CAN BE IGNORED)<br>    -**sINPUT**: a structure
 containing information about the input file used to generate the currated
 data (CAN BE IGNORED)<br>    -**sL4MMDS**: a structure containing
 the curated data with the following fields:<br>       
 -**inWorkSampleRate**: the sample rate of the recording<br>       
 -**db1TStamps**: time stamps for the all the samples in the
 recording<br>        -**db2LFP**: the Local Field Potential
 recording (a 16 channels x 5249484 samples matrix)<br>       
 -**in2MUATrace**: the Multi Unit Activity recording (a 16 channels x
 5249484 samples matrix). Counts the number of extracellular spikes at the
 time of each sample<br>        -**db1LChan**: Boundaries between
 cortical layer 1, 2-3, 4, 5 and 6 relative to channel order<br>     
   -**db1ChannelDepth**: Approximate depth of each channel in db2LFP or
 in2MUATrace<br>        -**db1ChanLayer**: The cortical layer in
 which each channel in db2LFP or in2MUATrace is situated<br>       
 -**bl1WheelOn**: a 5249484 samples boolean vector indexing the epochs of
 the recording where the mouse was running<br>       
 -**db1PupilArea**: a 5249484 samples vector of the pupil area<br>   
     -**db1FacePC1**: a 5249484 samples vector of the first principal
 component of facial motion energy<br>        -**bl1Whisk**: a
 5249484 samples vector indexing epochs when the mouse was
 whisking<br>        -**chScriptName**: the file name for the script
 used to compile the data (CAN BE IGNORED)<br>       
 -**chTimeComputed**: the time the data was compiled (CAN BE
 IGNORED) -*PCP_L5_GetPulse.mat*:<br>This file a
 structure **sCFG** containing the output of the CBASS method for the data
 in *PCP_L4_MakeMetaDataStructure.mat*. CBASS ties power in a given
 frequency band to discrete events in time. Here the method has been
 applied to detect events having energy in the beta range [15-30Hz]
 occurring more often during visual stimulation or events having energy in
 the gamma range [30-80Hz] occurring more often during locomotion. A full
 description of the method can be found in
 (https://github.com/cardin-higley-lab/CBASS) and in the following preprint
 (https://doi.org/10.1101/2022.05.13.491832). The structure has the
 following fields:<br>    -**sPARAM**: a structure containing the
 parameters that were used to generated the currated data (CAN BE
 IGNORED)<br>    -**sINPUT**: a structure containing information
 about the input file used to generate the currated data (CAN BE
 IGNORED)<br>    -**sL5**: a structure containing CBASS related data
 with the following fields:<br>        -**sBAND**: a structure array
 of the output of the CBASS methods for visual evokded beta [15-30Hz] (1)
 and locomotion modulated gamma [30-80Hz] (2) with the following
 fields:<br>            -**db1Band**: a 2 element vector describing
 the frequency band of interest<br>            -**chBandLabel** : a
 character array describing the frequency band of interest<br>       
     -**chStateLabel**: a character array describing the state of
 interest<br>            -**in1Index**: the indices of candidate
 events <br>            -**db1Power**: the power of the band filtered
 signal at the time of each events<br>            -**db1Score**: the
 enrichment score describing how much each candidate events is associated
 with the state of interest<br>            -**dbThreshold**: a
 threshold for the enrichment score, everything above is
 retained<br>            -**db1Score_Rnd**: an enrichment score
 calculated on random surrogate data with matching power spectra and
 correlation between channels for comparison<br>       
 -**bl1WheelOn**: a 5249484 samples boolean vector indexing the epochs of
 the recording where the mouse was running<br>        -**bl1Stim**: a
 5249484 samples boolean vector indexing the epochs of the recording where
 a visual stimulation of any contrast was displayed<br>       
 -**bl1StimFull**: a 5249484 samples boolean vector indexing the epochs of
 the recording where a full contrast visual stimulation was
 displayed<br>        -**inSampleRate**: the sample rate of the
 recording<br>        -**inRefChan**: the reference channel used to
 compute the CBASS method <br>        -**chScriptName**: the file
 name for the script used to compile the data (CAN BE IGNORED)<br>   
     -**chTimeComputed**: the time the data was compiled (CAN BE
 IGNORED) ## Code/Software The main
 component of the data set is a set of 8 matlab scripts that can be used to
 reproduce the figures of the manuscript:
 -*Script1_Fig_1.m*<br>-*Script2_Fig_S1.m*<br>-*Script3_Fig_S2.m*<br>-*Script4_Fig_2_S3.m*<br>-*Script5_Fig_S4.m*<br>-*Script6_Fig_3.m*<br>-*Script5_Fig_S5.m*<br>-*Script8_Fig_4.m* The scripts were written using version 2018b of Matlab. They make use of the following utilities, also included in the data set:<br>-*NS_ETA.m* <br>-*NS_FourierPowerHann.m* <br>-*NS_MeanErrPlot.m <br>-*NS_PlotLFP.m* <br>-*NS_SaveFig.m* <br>-*PCP_U_NormalizeLFP.m* <br>-*PPS_MakePulse.m* <br>-*PPS_PointProcess1.m* Script 1 to 7 should run without modification provided that the utilities are on the path. Script 8 will need to be modified so that the data in **2019-09-20_10-32-27_1** is loaded from the local address on the computer.
description: The script included here can be openned with Matlab (Mathwork)
 and have been developped with version 2018b. An open-source alternative is
 GNU octave (https://octave.org/.)
 but full compatibility was not tested.