From OpenWetWare
Jump to navigationJump to search
Brain picture
Beauchamp Lab

R Analysis and Visualization of ECOG Data (RAVE)

Return to list of tutorials.

Epoching Data

When ECOG data is recorded from a patient, it is recorded in a continuous block of data. However experiments occupy only discrete time periods within this data block. We support several ways of epoching data for subsequent analysis.

  • Epoching with photodiode
  • Epoching with audio tracing
  • Epoching with Matlab Psychtoolbox output
  • Manual Epoching

Under construction

Creating an epoch file for use in RAVE

Epoch files in rave have at least 5 columns. The column names must be specified as below and are case sensitive.

The Block column should reflect different recording sessions. For example, data was collected for an hour, recording stopped, the participant given a 1 hour break, and then data was collected for another hour. This would produce two Blocks. The value of the Block column must match exactly the file folder name it corresponds to. If your folder name has leading zeros (e.g., blocks 1, 2, and 3 are labelled 001, 002, and 003), take care that your spreadsheet software doesn't remove the leading 0s from this column. To force MS Excel to save the leading zeros, you can store the variable as text, by pre-prending an apostrophe (') to the block number: '001. The apostrophe will not appear in the CSV file.

The Time column should reflect the number of seconds from the beginning of the current block in seconds. Said another way, time is “local” to the block; because the data is stored per-block, this allows us to efficiently index into the .h5 file without having to worry about subtracting the offset from previous blocks.

The Trial column should be unique (though it may skip numbers if trials need to be omitted, e.g., for outlier removal) across blocks. Said another way, Trial number is "global" to the experiment. For example, block 001 has trials 1 to 60, block 002 has trials 61 to 120.

The Condition column is a string label for each trial. This column is used by RAVE to produce experimental contrasts.

The Duration column is currently ignored, but future modules may make use of it in particular analyses.

Other columns may be added, as necessary, but will be ignored by modules that are not checking for their existence.

Return to list of tutorials.