A very straightforward file called "config" (suffix .m, .py, or .R as appropriate) should be placed in the code/matlab, code/python, and code/R. The config file needs to specify three variables: data_dir, cache_dir, and plot_save_dir. Each should be a path pointing to the data directory, a location avaialable for caching, and the directory to save plots.
The fundamental data used in the MATLAB portions are structs with a structure specific to the data collection. Not all of it is needed, so a good deal of the metainformation is discarded in creating generalized holders for interacting with the underlying data (see DataHandler).
In the initial creation of a DataHandler, individual electrodes are (optionally) eliminated from the data set due to their extreme dissimilarity with the other electrodes. Mean cosine simmilarity with each other electrode is used as the simmilarity measure. Usually only a couple additional electrodes are excluded in this process. Note cosine simmilarity is calculated only with LFPs, but spike data associated with the "bad" electrodes are also eliminated.
The initial structuring of the data is trial-based, so there are separate fields for a trial and intertrial period. Even though spikes have global timestamps (i.e. not relative to a given trial or intertrial period), spikes tend not to be sorted across the trial sections. To facilitate analysis and alleviate headaches, spikes are sorted when they are combined in a single cell array in the DataHandler.
Lastly, there are many readily apparent anoalies in the LFP data (very large and highly rhythmic spikes). The data was therefore carefully selected to avoid the aberrant behavior. The exact times to split were determined via visual inspection.
The DataHandler class provides a couple methods of subsetting data based on trial conditions. Using these, it is possible to perform analysis on a variety of trial conditions and lengths of data. For example, LFP data can easily be selected from between noise onset and shape stimulus events and then passed to various spectral analysis methods (provided by Chronux). Using the electrode mapping information kept in each DataHandler, it is relatively easy to calculate LFP coherences and bin them based on the distance between the two electrodes.
trials spikes lfps
fixate noise shape saccade
Constructor select getDataSlices