pyCGM2.Signal#

Detector#

detectStart_fromThreshold(values, reference)

Detect the first frame where a signal crosses a threshold relative to a reference.

detect_cusum(x[, threshold, drift, ending, ...])

Cumulative sum algorithm (CUSUM) to detect abrupt changes in data.

detect_onset(x[, threshold, n_above, ...])

Detects onset in data based on amplitude threshold.

detect_peaks(x[, mph, mpd, threshold, edge, ...])

Detects peaks in data based on their amplitude and other features.

detect_seq(x[, value, index, min_seq, ...])

Detects indices in x of sequential data identical to a specified value.

Signal processing#

arrayLowPassFiltering(valuesArray, freq[, ...])

Applies a low-pass filter to a numpy array.

downsample(array, initFreq, targetedFreq)

Downsampling a signal from an initial frequency to a targeted frequency.

enveloppe(array, fc, fa)

Obtains the envelope of a signal using a low-pass filter.

forcePlateFiltering(btkAcq[, order, fc])

Applies low-pass filtering to force plate outputs in a btkAcquisition object.

highPass(array, lowerFreq, upperFreq, fa)

Applies a Butterworth bandpass filter to the input signal.

markerFiltering(btkAcq, markers[, order, ...])

Applies low-pass filtering to specified markers in a btkAcquisition object.

rectify(array)

Rectifies a signal by taking the absolute value of each element.

remove50hz(array, fa)

Removes the 50Hz frequency component from the provided signal array.

Additional signal processing#

upsample(array, initFreq, targetedFreq)

Upsampling a signal from an initial frequency to a targeted frequency.

Detection modules#

detect_changes#

detect_cusum(x[, threshold, drift, ending, ...])

Cumulative sum algorithm (CUSUM) to detect abrupt changes in data

detect_peaks#

detect_peaks(x[, mph, mpd, threshold, edge, ...])

Detect peaks in data based on their amplitude and other features.

Anomaly#

anomaly_rolling(values[, aprioriError, ...])

Detects anomalies in a sequence of values using a rolling window approach.

SciPy wrapper#

safe_cumtrapz(y[, x, dx, axis, initial])

Cumulative trapezoidal integration compatible with SciPy < 1.14 (cumtrapz) and >= 1.14 (cumulative_trapezoid).