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_dfpd.DataFrame
The DataFrame corresponding to the
annotations.tsvfile.- 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
listofstr|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.
- verbosebool
Verbosity.
- Returns:
- ch_hfo_rates
dict The HFO rates per channel with any HFOs.
- ch_hfo_rates
See also
mne_hfo.io.read_annotationsReading in annotations.tsv file as DataFrame.
References