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
417 stars 113 forks source link

Remove "Avoid too high threshold caused by Artefacts / Motion during Wake"? #27

Closed Hockey86 closed 3 years ago

Hockey86 commented 3 years ago

https://github.com/raphaelvallat/yasa/blob/4b5973bfcf92788f080e3ca05bc2aa1402df8865/yasa/main.py#L660 It uses absolute voltage 10 which does not apply to other scenarios. Suggest it to be removed, since you already can specify hypno and include in yasa.spindles_detect.

raphaelvallat commented 3 years ago

Hi @Hockey86,

Thanks for opening the issue. So just to clarify, it is in units of standard deviation, and not in unit of absolute voltage:

https://github.com/raphaelvallat/yasa/blob/4b5973bfcf92788f080e3ca05bc2aa1402df8865/yasa/main.py#L653-L658

Now I think you're right that the min(thresh_rms, 10) is somewhat arbitrary, and we might as well remove it and just keep the original thresh_rms.

Raphael