yasa.SWResults.summary#
- SWResults.summary(grp_chan=False, grp_stage=False, mask=None, aggfunc='mean', sort=True)[source]#
Return a summary of the SW detection, optionally grouped across channels and/or stage.
- Parameters:
- grp_chanbool
If True, group by channel (for multi-channels detection only).
- grp_stagebool
If True, group by sleep stage (provided that an hypnogram was used).
- maskarray_like or None
Custom boolean mask. Only the detected events for which mask is True will be included in the summary. Default is None, i.e. no masking (all events are included).
- aggfuncstr or function
Averaging function (e.g.
'mean'or'median').- sortbool
If True, sort group keys when grouping.