R Analysis and Visualization of ECOG Data (RAVE)
Return to list of tutorials.
[Deprecated] Older method for formatting data for RAVE
- Assume you have pre-processed your subject and have 1 mat file per electrode
- Pre-processing pipeline in our data includes common average reference, epoching, notch filtering, time-frequency analysis using 'multitaper method' (dpss for 30-200 Hz, hanning for 2-30 Hz), resulting in power-spectra over time at each frequency
- Each mat file contains a matrix with: [trial, freq, time]
- these mat files are the output of matlab script 'write_out_electrodes.m'
- note that since preprocessing at low and high frequencies is performed using different tapers, the 'write_out_electrodes.m' script must concatenate 2-30 Hz with 32-200 Hz data prior to creating mat files
- Also need information about each dimension in meta folder
- 'trials.csv:' data corresponds to the 1st mode in the .mat file.
- Column 1: Number (numeric) -- cell A1 is 'Number', A2 reads '1', A3 reads '2', ... , An reads 'n'
- Column 2: Type (string) -- cell B1 reads 'Type', then data begins in B2
- Column 3: Stimulus (string) -- cell C1 reads 'Stimulus', then data begins in C2
- Other columns will be imported as a string and made available to the module
- Note in GUI, conditions will appear as 'Stimulus_Type'
- 'frequencies.csv:' has the frequencies that correspond to the 2nd mode in the .mat file
- Column 1: Frequency (numeric) -- cell A1 reads 'Frequency', then data begins in A2
- 'time_points.csv:' has the timestamps that correspond to the 3rd mode in the .mat file
- Column 1: Time (numeric) -- cell A1 reads 'Time'
- By default, many modules consider values prior to time '0' as the baseline period. In many modules this can also be changed.
- 'electrodes.csv:' Contains information corresponding to each electrode. this corresponds to the 4th mode of the data, but this is not directly represented in users' the file system.
- Column 1: Label (string) (this is used throughout the application as a unique identifier)
- Column 2: Number (integer)
- This value is not explicitly used in the module, but is required here to facilitate matching with the raw data.
- Column 3: Valid (0 or 1)
- If the value is 0, the electrode is not imported or cached, or even checked for existence in the data/ directory. We allow for invalid electrodes to provide a way to match between the raw data files coming from the recording system and the final data that will be analyzed.
- Column 4-6: Coordinates for the electrode in the space of the surface file
- Coord_x (numeric)
- Coord_y (numeric)
- Coord_z (numeric)
- Create a folder in your data directory (you will tell the application where your data are located, so this location can be arbitrary).
- data/
- subject_name/
- ecog/
- e1.mat
- ...
- eN.mat
- meta/
- trials.csv
- frequencies.csv
- time_points.csv
- electrodes.csv
- suma/
|