How to use the yasa.sw_detect function in yasa

To help you get started, we’ve selected a few yasa examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github raphaelvallat / yasa / notebooks / 05_run_visbrain.py View on Github external
def fcn_sw(data, sf, time, hypno):
    """Replace Visbrain built-in slow-wave detection by YASA algorithm.
    """
    # On N2 / N3 sleep only
    # Note that if you want to apply the detection on N3 sleep only, you should
    # use sw_detect(..., include=(3))
    sw = sw_detect(data, sf, hypno=hypno)
    return (sw[['Start', 'End']].values * sf).astype(int)

yasa

YASA: Analysis of polysomnography recordings.

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

61 / 100
Full package analysis

Similar packages