Preprocessing dashboard¶
from sleepeegpy.dashboard import create_dashboard
from joblib import parallel_backend; parallel_backend("loky", n_jobs=-1)
Add required files¶
path_to_eeg - Can be either raw .mff or resampled, filtered, or cleaned .fif file.
hypnogram - It can be either path to hypnogram, ‘predict’, or None. ‘predict’ for automatic prediction, and None for the whole recording visualizations.
hypno_freq - If you don’t have a hypnogram, set hypno_freq to None.
reference - Reference to apply as mne’s set_eeg_reference accepts.
hypno_psd_pick - Channel to plot the spectrogram and PSD.
path_to_ica_fif - If you performed an ICA, provide the path to the file With ICA components (the file should be saved with components selected for exclusion).
topomap_cbar_limits - Whether to set manual topomap power limits. Should be a list of 4 tuples of 2 floats, e.g., [(0,10),(0, 30),(0,50),(10, 100)]
fig = create_dashboard(
subject_code="EL3001",
path_to_eeg=r"EL3001\CleaningPipe\cleaned_raw.fif",
hypnogram=r"EL3001\staging.txt",
hypno_freq=1,
output_dir=r"EL3001",
reference="average",
hypno_psd_pick=["E101"],
path_to_ica_fif=r"EL3001\ICAPipe\exclude-ica.fif",
power_colorbar_limits=None,
)