API Documentation

API reference for the bycyle module.

Cycle-by-cycle

Classes

Bycycle([center_extrema, burst_method, ...])

Compute bycycle features from a signal.

BycycleGroup([center_extrema, burst_method, ...])

Compute bycycle features for a 2d or 3d signal.

Feature Functions

compute_features(sig, fs, f_range[, ...])

Compute shape and burst features for each cycle.

compute_shape_features(sig, fs, f_range[, ...])

Compute shape features for each cycle.

compute_burst_features(df_shape_features, sig)

Compute burst features for each cycle.

compute_cyclepoints(sig, fs, f_range, ...)

Compute sample indices of cyclepoints.

Group Feature Functions

compute_features_2d(sigs, fs, f_range[, ...])

Compute shape and burst features for a 2 dimensional array of signals.

compute_features_3d(sigs, fs, f_range[, ...])

Compute shape and burst features for a 3 dimensional array of signals.

Segmentation Functions

find_extrema(sig, fs, f_range[, boundary, ...])

Identify peaks and troughs in a time series.

find_zerox(sig, peaks, troughs)

Find zero-crossings within each cycle, from identified peaks and troughs.

Waveform Phase Estimation Functions

extrema_interpolated_phase(sig, peaks, troughs)

Use extrema and (optionally) zero-crossings to estimate instantaneous phase.

Burst Detection Functions

detect_bursts_cycles(df_features[, ...])

Detects bursts based on consistency between cycles.

detect_bursts_amp(df_features[, ...])

Detect bursts based on amplitude thresholding.

detect_bursts_dual_threshold(sig, fs, ...[, ...])

Detect bursts in a signal using the dual threshold algorithm.

recompute_edges(df_features, threshold_kwargs)

Recompute the is_burst column for cycles on the edges of bursts.

Plotting Functions

plot_burst_detect_summary(df_features, sig, ...)

Plot the cycle-by-cycle burst detection parameters and burst detection summary.

plot_burst_detect_param(df_features, sig, ...)

Plot a burst detection parameter and threshold.

plot_cyclepoints_df(df_samples, sig, fs[, ...])

Plot extrema and/or zero-crossings from a DataFrame.

plot_cyclepoints_array(sig, fs[, peaks, ...])

Plot extrema and/or zero-crossings from arrays.

plot_feature_hist(feature, param_label[, ...])

Plot a histogram for a cycle feature.

plot_feature_categorical(df_features, ...[, ...])

Plot a cycle feature by one or more categories.

Utility Functions

limit_signal(times, sig[, start, stop])

Restrict signal and times to be within time limits.

limit_df(df, fs[, start, stop, reset_indices])

Restrict dataframe to be within time limits.

get_extrema_df(df)

Determine whether cycles are peak or trough centered.

rename_extrema_df(center_extrema, df_features)

Rename a dataframe based on the centered extrema.

split_samples_df(df_features)

Move cyclepoints sample indices columns to a separate dataframe.

drop_samples_df(df_features)

Remove cyclepoints sample columns from a dataframe.

epoch_df(df_features, sig_len, epoch_len)

Reshape a dataframe into a list of dataframes.

flatten_dfs(dfs_features, labels[, column_name])

Flatten a list of dataframes into a single dataframe with a group column(s).