adam2392 / motor-decoding

0 stars 0 forks source link

Extend data loading functions to include extra trials from the WAR and/or Move task #8

Open ChesterHuynh opened 3 years ago

ChesterHuynh commented 3 years ago

Extend functions in io/read.py to allow inclusion of fixation data from the WAR task

adam2392 commented 3 years ago

I am extending the data structure for "Trials" to contain more of the metadata information. In addition, I've written the behavioral XY coordinate data over time as a compressed "tsv" file. Will upload an API to read this data.

adam2392 commented 3 years ago

The strategy to robustly get metadata to the Epochs data structure and downstream tasks is:

  1. Load in Epochs (e.g. 98 x T): T time points
  2. Load in trial metadata (e.g. 98 x M): M metadata points
  3. Set metadata for Epochs data structure: See https://mne.tools/stable/generated/mne.Epochs.html for things you can thus do at the epochs level.

Dropping epochs -> results in dropping said metadata All metadata goes hand-in-hand w/ the epochs

Resulting in the following API:

and the dataclass:

Note on XY coordinate data

The XY coordinate movement data of the cursor has the same sampling rate as the raw EEG. Thus we can treat it like a mne.io.Raw object with two sensors: (x, and y). We can add the corresponding events data structure to it, so we could theoretically form an Epochs data structure. Or we can perform parsing on it to determine average speed between two endpoints of a specific trial.