-
Notifications
You must be signed in to change notification settings - Fork 5
Data
The minimal data required to use the fitting routine is a vector of frequencies and a vector of powers for the power spectral density. This is shown in fit_single.m
.
For state tracking, the .mat
data files are initially created using import_raw_eeg
in Romesh's tracking repository, not available on GitHub. This computes a set of power spectra and performs artifact detection. It also does this for multiple electrodes.
These .mat
files are then loaded for fitting using mcmc.load_subject_data
. This function detects sleep onset and truncates the start of the recordings, and also supports selecting only a subset of the electrodes.
Contaminated 4s spectra are automatically excluded by import_raw_eeg
and are therefore not seen by later stages of processing. However, the 30s spectra should always be included (if there is a run of more than 30s of contaminated 4s spectra, an error should be raised by import_raw_eeg
and the .mat
file would not be generated). The number of clean spectra contributing to each 30s spectrum is recorded in the nspec
variable. It is up to the fitting wrapper e.g., fit_cluster.m
to decide how to handle these spectra.