pyvtna.signal

Functions

closest_idx(sig, val)

Get the index of the value in a signal sig that is closest to val.

derivSNR(sig)

Return the ratio of maximum magnitude of the signal derivative to the standard deviation of the signal derivative

drop_neg(t, ss)

Remove all negative points in a signal.

dv_dx(vs[, xs])

Take the derivative of a 1D array vs with spacing xs

filter_shift(sig, time[, win])

Like shift_zero but first smooths, then shifts with a correction for the smoothing.

filter_shift_spear(sig, time[, window])

Remove all points before actual signal starts.

get_best_win(sig[, minwin, maxwin, mode])

Chooses a smoothing window size for maximizing the signal-to-noise ratio.

interp_neg(t, s)

Remove all negative points in a signal and interpolate between the surrounding points.

interp_neg_comp(t, s[, method])

Remove all negative points in a signal and interpolate between the surrounding points.

is_ascending(sig)

Decide whether a signal is generally increasing.

rangeSNR(sig)

Return the ratio of the signal range to its standard deviation.

replace_neg(s[, val])

Replace all negative points in a signal with a set value.

rolling_mean(arr[, win])

Return the rolling average of an array with set window length and uniform weighting

shift_zero(sig, time[, window])

Remove all points before actual signal starts.

shift_zero_spear(sig, t)

Remove all points before actual signal starts.

signaltonoise(sig[, axis, ddof])

Return the signal to noise ratio of a signal s

smooth(x[, window_len, window, general_sig])

smooth the data using a window with requested size.

x_rolling(x[, win])

Return the x_values for the data returned by taking a rolling mean using nan()