beauchamplab / rave

For all RAVE info, including installation instructions, visit
https://beauchamplab.github.io/rave
23 stars 5 forks source link

What's the raw data format? #17

Closed dipterix closed 3 years ago

dipterix commented 5 years ago

A question raised in sfN note:

What's raw input format?

dipterix commented 5 years ago

Import Raw Data

Because iEEG/ECoG raw data is usually encrypted and licensed. We cannot read those raw files directly into RAVE. The procedure of reading iEEG data would be:

  1. Use scripts provided by manufacturers to convert original raw data to some format (usually matlab or text format).
  2. Import files got in the previous step to RAVE

We cannot control the first step due to license issues (maybe in the future we can do it). As for the second step, please send us sample files and we can write scripts to import them. Also as BIDS and other standard formats coming out, we will stick with those formats.

Right now the raw data format is: (let's say subject code: YAB)

YAB <subject dir>
      |-- 008 <block/run number>
            |-- YABDatafile008_ch1.mat <analogTraces for block 008, channel 1>
            |-- ...
            |-- YABDatafile008_ch84.mat
      |-- 010
      |-- ...
      |-- 012

Each .mat file is a Matlab (version 5) file for one channel at certain block.

Import Processed Data

Let's say you have subjects already preprocessed in certain format, or you can't get original voltage data (only have power data for example), please send us sample files and we can write scripts to load them into RAVE.

Some features might be turned off by RAVE, depending on what type of data you have. For example, if you only have power data, you cannot reference channels since that requires voltage or both power and phase data. However, you can still use condition explorers.

dipterix commented 5 years ago

I wrote a script to migrate data that are already preprocessed to RAVE. You need to implement TODOs in the script. Consider running the following code, which will generate a template for you.

# Update RAVE:
devtools::install_github('beauchamplab/rave@dev')

# Install rstudioapi if you cannot run
install.packages('rstudioapi')

# Load preprocessing script
fpath = system.file('utils/migrate_subject.R', package = 'rave')
rstudioapi::documentNew(text = paste(readLines(fpath), collapse = '\n'), type = 'r')

Config subject settings and implement function load_data which returns a list of voltage, power, and phase data. See comments for details.