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
objectseeg_data
objects are the base class used for continuous
data. When raw data is imported, the output is this class. 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
coordinateshead(eegUtils:::electrodeLocs)
#> # A tibble: 6 × 9
#> electrode radius theta phi cart_x cart_y cart_z x y
#> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 LPA 1 -119 13 -86.1 -20.0 -48.0 -116. -26.8
#> 2 RPA 1 119 -13 85.8 -20.0 -48.0 116. -26.8
#> 3 Nz 1 115 90 0.01 86.8 -40.0 0 115
#> 4 Fp1 1 -94 -71 -29.4 83.9 -6.99 -30.6 88.9
#> 5 Fpz 1 91 90 0.11 88.2 -1.71 0 91
#> 6 Fp2 1 94 71 29.9 84.9 -7.08 30.6 88.9
timings
epochs
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 onsetevent_time
still gives the time point at which the
event occurs relative to the recording onsetevents(demo_epochs)
#> # A tibble: 80 × 5
#> event_onset event_time event_type epoch time
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 4128 8.06 208 1 0
#> 2 7037 13.7 213 2 0
#> 3 10043 19.6 215 3 0
#> 4 12928 25.2 213 4 0
#> 5 15868 31.0 207 5 0
#> 6 18777 36.7 207 6 0
#> 7 21578 42.1 213 7 0
#> 8 24554 48.0 213 8 0
#> 9 27379 53.5 222 9 0
#> 10 30306 59.2 208 10 0
#> # ℹ 70 more rows
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.epochs
epochs(demo_epochs)
#> # A tibble: 80 × 4
#> epoch recording epoch_label participant_id
#> <dbl> <lgl> <lgl> <chr>
#> 1 1 NA NA 001
#> 2 2 NA NA 001
#> 3 3 NA NA 001
#> 4 4 NA NA 001
#> 5 5 NA NA 001
#> 6 6 NA NA 001
#> 7 7 NA NA 001
#> 8 8 NA NA 001
#> 9 9 NA NA 001
#> 10 10 NA NA 001
#> # ℹ 70 more rows
eeg_tfr
objects hold time-frequency representations of
eeg_epochs
objects.
signals
dimensions
eeg_ICA
objects contain the results of either an ICA or
an SSD decomposition applied to an eeg_epochs
object.
mixing_matrix
unmixing_matrix
signals
- individual component activations