yasa.REMResults#

class yasa.REMResults(events, data, sf, ch_names, hypno, data_filt)#

Output class for REMs detection.

Attributes:
_eventspandas.DataFrame

Output detection dataframe

_dataarray_like

EOG data of shape (n_chan, n_samples), where the two channels are LOC and ROC.

_data_filtarray_like

Filtered EOG data of shape (n_chan, n_samples), where the two channels are LOC and ROC.

_sffloat

Sampling frequency of data.

_ch_nameslist

Channel names (= ['LOC', 'ROC'])

_hypnoarray_like or None

Sleep staging vector.

__init__(events, data, sf, ch_names, hypno, data_filt)#

Methods

__init__(events, data, sf, ch_names, hypno, ...)

compare_channels([score, max_distance_sec])

Compare detected events across channels.

compare_detection(other[, max_distance_sec, ...])

Compare detected events between two detection methods, or against a ground-truth scoring.

get_coincidence_matrix([scaled])

get_mask()

Return a boolean array indicating for each sample in data if this sample is part of a detected event (True) or not (False).

get_sync_events([center, time_before, ...])

Return the raw or filtered data of each detected event after centering to a specific timepoint.

plot_average([center, time_before, ...])

Plot the average REM.

plot_detection()

Plot an overlay of the detected events on the signal.

summary([grp_stage, mask, aggfunc, sort])

Return a summary of the REM detection, optionally grouped across stage.