How to use the yasa.spindles_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_spindle(data, sf, time, hypno):
    """Replace Visbrain built-in spindles detection by YASA algorithm.
    See http://visbrain.org/sleep.html#use-your-own-detections-in-sleep
    """
    # Apply on the full recording
    # sp = spindles_detect(data, sf)
    # NREM sleep only
    sp = spindles_detect(data, sf, hypno=hypno)
    return (sp[['Start', 'End']].values * sf).astype(int)

yasa

YASA: Analysis of polysomnography recordings.

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

63 / 100
Full package analysis

Similar packages