Skip to content
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by raphaelvallat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question 🙋 Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #221 on January 06, 2026 19:34.