gravitools.math
calculate_allan_dev(ds, taus='octave', measurement_rate=None)
Calculate the overlapped Allan deviation of a time series.
Parameters:
-
ds(Series) –Time series of frequency input data.
-
taus(array or str, default:'octave') –Time differences (tau), in seconds, for which the Allan deviation is calculated. Specify "all", "octave" or "decade" for automatic generation. See
allantools.oadevdocumentation. -
measurement_rate(float, default:None) –Sampling rate of the input data, in Hz. Specify None to calculate from average interval.
Returns:
-
Series–Allan deviation at different taus
interval_means(series, interval, min_count=None, name=None, err='sem')
Calculate interval means of a time series
See pandas.DataFrame.resample.
Parameters:
-
series(Series) –Input time series.
-
interval(str) –Resampling interval, e. g. "1h".
-
min_count(int | float, default:None) –Minimum number of samples required in each interval. For intervals with fewer samples, the mean value is set to NaN. A fractional value
0 < min_count < 1is interpreted as a fraction of the maximum number of samples. -
name(str, default:None) –Prefix of the output dataframe's columns. If unspecified, the input series'
nameattribute is used, or "y", if it does not have a name. -
err(str, default:'sem') –Statistical function to use for error column. Options are "sem" (standard error of the mean) and "std" (standard deviation).
Returns:
-
DataFrame–Time series of mean value, standard error of the mean (SEM), and count of samples per interval.
truncate(x, digits=0)
Truncate a float number to specified digits
weighted_mean(values, errors)
Weighted mean, standard deviation and standard error of the mean