mne_hfo.compute_chs_hfo_rates¶
-
mne_hfo.
compute_chs_hfo_rates
(annot_df, rate, ch_names=None, end_sec=None, verbose=True)[source]¶ Compute channel HFO rates from annotations DataFrame.
This function will assume that each row is another HFO event. If you want to pre-process the HFOs that in some way overlap, do so beforehand.
- Parameters
annot_df : pandas.core.DataFrame
The DataFrame corresponding to the
annotations.tsv
file.rate : str
The frequency at which to compute the HFO rate. One of
s
(second),m
(minute),h
(hour),d
(day) to compute rate of the dataframe.ch_names : list of str | None
A list of channel names to constrain the rate computation to. Default = None will compute rate for all channels present in the
annot_df
.end_sec : float | None
The end time (in seconds) of the dataset that HFOs were computed on. If None (default), then will take the last detected HFO as the end time point.
verbose : bool
Verbosity.
- Returns
ch_hfo_rates : dict
The HFO rates per channel with any HFOs.
See also
mne_hfo.io.read_annotations
Reading in annotations.tsv file as DataFrame.
References