Hypnogram/annotation alignment with EEG #222
-
|
Hello, I am interested in using YASA to compute spindle/slow wave detection on several datasets, but I am confused about how hypnograms are being aligned with the EEG data without being able to enter a 'lights off' marker when recording length > annotation length (e.g., biocals, etc.). I can enter start times for my annotations with the newer yasa.Hypnogram(), but it seems most functions currently require a 1D series rather than the Hypnogram class/object. I appreciate any guidance you can provide. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @dsmit16, If you want to pass an hypnogram to the spindles/SW detection, the hypnogram must have the same number of samples as data. To upsample your hypnogram, please refer to yasa.hypno_upsample_to_data. It is up to the user to adjust the start/stop times of their EEG data and hypnogram to match. I typically work with EEG data that has been already cropped to the time in bed (lights off to lights on). For cropping EEG data with MNE, please see this thread: https://mne.discourse.group/t/cropping-data-based-on-annotations/7724 Thanks |
Beta Was this translation helpful? Give feedback.
Hi @dsmit16,
If you want to pass an hypnogram to the spindles/SW detection, the hypnogram must have the same number of samples as data. To upsample your hypnogram, please refer to yasa.hypno_upsample_to_data.
It is up to the user to adjust the start/stop times of their EEG data and hypnogram to match. I typically work with EEG data that has been already cropped to the time in bed (lights off to lights on).
For cropping EEG data with MNE, please see this thread: https://mne.discourse.group/t/cropping-data-based-on-annotations/7724
Thanks
Raphael