raphaelvallat / yasa

YASA (Yet Another Spindle Algorithm): a Python package to analyze polysomnographic sleep recordings.
https://raphaelvallat.com/yasa/
BSD 3-Clause "New" or "Revised" License
428 stars 115 forks source link

Question about REM density #175

Open laura-hainke opened 5 months ago

laura-hainke commented 5 months ago

Hello, how is rapid eye movement density calculated with YASA? After using rem_detect() and summary(), the parameter "Density" is shown, but what is the unit? Thank you!

raphaelvallat commented 5 months ago

Hi @laura-hainke,

The density parameter is the number of events per minute:

https://github.com/raphaelvallat/yasa/blob/b1e866c2d949dae2c37bda7d919d646e0f1e9780/yasa/detection.py#L220-L233

Thanks, Raphael

laura-hainke commented 4 months ago

Thanks for clarifying, Raphael!

remrama commented 1 month ago

Probably worth adding this quickly to the documentation before closing the issue. (I'll do it.)