peak_to_peak_period

gala.dynamics.peak_to_peak_period(t, f, amplitude_threshold=0.01)[source]

Estimate the period of the input time series by measuring the average peak-to-peak time.

Parameters
tarray_like

Time grid aligned with the input time series.

farray_like

A periodic time series.

amplitude_thresholdnumeric (optional)

A tolerance parameter. Fails if the mean amplitude of oscillations isn’t larger than this tolerance.

Returns
periodfloat

The mean peak-to-peak period.