yasa.sleep_statistics #148
-
Hi Raphael, thanks for your amazing work with YASA! Sleep onset latency: Latency to first epoch of any sleep --> my question is: is one epoch enough, or do you have a condition like the first epoch of sleep (for example N1) needs to be followed by at least 2 more consecutive N1 epochs or by any other sleep stage (for example N2? So if you have W-W-N1-W-N1-N2 is sleep onset the first N1 epoch or the second one? Sleep Period Time: duration from first to last period of sleep --> my question here is similar to above: is the fist period of sleep the first epoch of any sleep stage independent of what follows or is there a conditional rule? For example 3 consecutive N1 epochs are needed to classify this as first period of sleep. Latencies: latencies of sleep stages from the beginning of the record --> my question is: REM latency should be the time from sleep onset to first epoch of REM according to the AASM guidelines. Is REM latency calculated like this, or as time from the beginning of the record? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @olly1987, Sleep onset latency: no condition, SOL is simply the latency to the first epoch of sleep. We could implement a "latency to persistent sleep" if desired. Sleep Period Time:
Correct Latencies
As of now, "Lat_REM" returned by YASA is the latency from the beginning of the record to first epoch of sleep, which is consistent with other sleep stages. You can easily calculate the AASM REM latency by substracting the SOL. However, you are right that this should be made more explicit in the documentation of the function. I'll open an issue now. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @olly1987,
Sleep onset latency: no condition, SOL is simply the latency to the first epoch of sleep. We could implement a "latency to persistent sleep" if desired.
Sleep Period Time:
Correct
Latencies
As of now, "Lat_REM" returned by YASA is the latency from the beginning of the record to first epoch of sleep, which is consistent with other sleep stages. You can easily calculate the AASM REM latency by substracting the SOL. However, you are right that this should be made more explicit in th…