vignettes/data_structures.Rmd
data_structures.Rmd
eegUtils
uses S3 objects to store EEG data and associated information such as channel locations. Using different object classes for data structured in different ways ensures that the various plotting functions work consistently across different types of EEG data. For example, there are different classes for epoched (eeg_epochs
) and continuous data (eeg_data
), and for time-frequency representations of data (eeg_tfr
).
eeg_data
objects are the base class that all continuous data has. When raw data is imported, the output is this class. Currently, this class is a list constituting the following entries:
signals
srate
events
chan_info
electrode
- electrode namesradius
- Spherical co-ordinates (Radius is typically normalized to 1)theta
- Spherical co-ordinates (theta)phi
- Spherical co-ordinates (theta)cart_x
- Cartesian 3D coordinatescart_y
- Cartesian 3D coordinatescart_z
- Cartesian 3D coordinatesx
- 2D Stereographic projection of the spherical coordinatesy
- 2D Stereographic projection of the spherical coordinatestimings
continuous
reference
ref_chans
- Labels for channels used to calculate the reference data. Can also be “average”.excluded
- Labels for any channels excluded from the reference data.eeg_epochs
objects share the same overall structure with eeg_data
objects, but some of the internals currently differ, as described below.
events
epoch
and time
.
epoch
gives the epoch number to which a given event belongstime
gives the time point at which the event occurs relative to the epoch onset
event_time
still gives the time point at which the event occurs relative to the recording onset
timings
epoch
.
epoch
gives the epoch number to which a given datapoint belongssample
still uniquely identifies each datapointtime
now gives the time relative to the zero-point of the epoch, i.e. the event on which the epoch is centred.eeg_tfr
objects hold time-frequency representations of eeg_epochs
objects.
signals
dimensions
eeg_ICA
objects contain the results of an ICA decomposition applied to an eeg_epochs
objects.
mixing_matrix
unmixing_matrix
signals
- individual component activations