raphaelvallat/yasa

Invalid REM latency

raphaelvallat opened this issue · 1 comments

From #148

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?

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. One can easily calculate the AASM REM latency by subtracting the SOL. However, this should be made more explicit in the documentation of the function.