API Documentation#

mne_hfo:

MNE software for computing HFOs from iEEG data.

Detectors#

LineLengthDetector([threshold, win_size, ...])

Line-length detection algorithm.

RMSDetector([threshold, win_size, overlap, ...])

Root mean square (RMS) detection algorithm (Staba Detector).

HilbertDetector([threshold, filter_band, ...])

2D HFO hilbert detection used in Kucewicz et al. 2014.

BIDS-IO functions#

create_annotations_df(onset, duration, ...)

Create a BIDS-derivative annotations dataframe for HFO events.

read_annotations(fname[, root])

Read annotations.tsv Derivative file.

write_annotations(annot_df, fname, ...[, ...])

Write annotations dataframe to disc.

Post-processing HFO Detections#

match_detected_annotations(ytrue_annot_df, ...)

Given two annotations.tsv DataFrames, match HFO detection overlaps.

find_coincident_events(hfo_dict1, hfo_dict2)

Get a dictionary of hfo events that overlap between two sets.

compute_chs_hfo_rates(annot_df, rate[, ...])

Compute channel HFO rates from annotations DataFrame.

merge_overlapping_events(df)

Merge overlapping events detected.

Help transform data to be scikit-learn compatible (for SearchCV)#

make_Xy_sklearn(raw, df)

Make X/y for HFO detector compliant with scikit-learn.

DisabledCV()

Dummy CV class for SearchCV scikit-learn functions.

Metrics#

compute_rms(signal[, win_size])

Calculate the Root Mean Square (RMS) energy.

compute_line_length(signal[, win_size])

Calculate line length.

compute_hilbert(signal, freq_cutoffs, ...)

Compute the Hilbert envelope for a single channel.

apply_std(metric, threshold_dict, kwargs)

Calculate and apply the threshold based on number of standard deviations.

apply_hilbert(metric, threshold_dict, kwargs)

Apply the Hilbert z-score thresholding scheme.

threshold_tukey(signal, threshold)

Calculate threshold by Tukey method.

Simulation#

simulate_pink_noise(N[, random_state])

Create a pink noise (1/f) with N points.

simulate_brown_noise(N[, random_state])

Create a brown noise (1/f²) with N points.

simulate_line_noise([fs, freq, numcycles, ...])

Line noise artifact.

simulate_delta([fs, decay_dur, random_state])

Delta function with exponential decay.

simulate_artifact_spike([fs, dur, random_state])

Artifact like spike (sharp, not gaussian).

simulate_spike([fs, dur, random_state])

Create a simple gaussian spike.

simulate_hfo([fs, freq, numcycles, random_state])

Create a simulated HFO signal.