yasa.SpindlesResults.summary#
- SpindlesResults.summary(grp_chan=False, grp_stage=False, mask=None, aggfunc='mean', sort=True)[source]#
Return a summary of the spindles 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.
- Returns:
- summary
pandas.DataFrame One row per detected event or, if grouping, one row per group with the number of events (
Count), the density per minute of each stage (Density, only when grouping by stage with an hypnogram) and the averaged features.
- summary