yasa.load_profusion_hypno

yasa.load_profusion_hypno(fname, replace=True)[source]

Load a Compumedics Profusion hypnogram (.xml).

The Compumedics Profusion hypnogram format is one of the two hypnogram formats found in the National Sleep Research Resource (NSRR) website. For more details on the format, please refer to https://github.com/nsrr/edf-editor-translator/wiki/Compumedics-Annotation-Format

Parameters
fnamestr

Filename with full path.

replacebool

If True, the integer values will be mapped to YASA default, i.e. 0 for Wake, 1 for N1, 2 for N2, 3 for N3 / S4 and 4 for REM. Note that the native profusion format is identical except for REM sleep which is marked as 5.

Returns
hypno1D array (n_epochs, )

Hypnogram, with one value per 30 second epochs.

sf_hypfloat

Sampling frequency of the hypnogram. Default is 1 / 30 Hz.