RAVE:ravepreprocess

From OpenWetWare
Jump to navigationJump to search
RAVE logo R Analysis and Visualization of iEEG

RAVE




Overview

Preprocessing data for RAVE involves the following steps

  1. Import iEEG data
  2. Select data to preprocess
  3. Notch filtering
  4. Wavelet decomposition
  5. Epoch data
  6. Import volumetric MRI data and cortical surface models
  7. Localize electrodes
  8. Define iEEG channel references (e.g. common average reference; bipolar) using the Reference module.

Importing data

 rave::rave_import_rawdata('subject_code','project_name')

Is the recommended command to import raw iEEG data . The script searches for the specified project_name directory within the specified subject_code directory and copies all files found there into RAVE's directory and file structure. The script requests the sampling rate of the data during data acquisition (e.g. enter 2000 for 2 kHz sampling rate), then scans the specified directory. The user selects the data blocks corresponding to the appropriate project_name. The script determined whether the data is stored as 1 file per channel or 1 file containing all channels (for this, the file name must be exactly the same across the selected blocks.)

Alternate Method: Instead of using the script, users can manually place files in the correct directory structure.

Selecting data to preprocess

To launch the preprocessing app, run the command

rave::rave_preprocess()

Click on the menu screenshots for more details about each step.

Tip: a common issue is that there are some channels that you do not wish to analyze with RAVE (for instance, data from EKG leads). RAVE is designed for the case where there is a brain electrode for each channel's data stream. There are several ways to eliminate channels without associated brain electrodes. In the "Overview" menu in RAVE_Preprocess, select only the electrodes that you wish to analyze in the "Electrodes" input box (e.g. if there are 90 channels, but channels 5 through 10 are EKG channels, enter "1-4,11-90" into the input box). This will allow RAVE to skip the EKG channels. Alternately, one could make a .mat file that contains only channels 1-4 and 11-90 and then load the entire file into RAVE. Note that in this case the channel numbering will be off relative to the original channel numbering.


RAVE:ravepreprocess:ravepreprocessoverview:input overviewRAVE:ravepreprocess:ravepreprocessoverview:output informationPreprocessing

Notch filtering

RAVE:ravepreprocess:ravepreprocessnotch:input notchfilterRAVE:ravepreprocess:ravepreprocessnotch:input inspectionRAVE:ravepreprocess:ravepreprocessnotch:output notchinspectsignalsPreprocessing


Wavelet decomposition

RAVE:ravepreprocess:ravepreprocesswavelet:input generalsettingsRAVE:ravepreprocess:ravepreprocesswavelet:input waveletsettingsRAVE:ravepreprocess:ravepreprocesswavelet:input detailsRAVE:ravepreprocess:ravepreprocesswavelet:output waveletkernelsPreprocessing

Troubleshooting: If Wavelet decomposition crashes, it is often because the "Number of Cores" setting is too high. Using more CPU cores speeds up processing but also requires more RAM. Try decreasing the "Number of Cores" setting.