increments (pyleoclim.utils.tsutils.increments)
- pyleoclim.utils.tsutils.increments(x, step_style='median')[source]
- Establishes the increments of a numerical array:
start, stop, and representative step.
- Parameters
x (array) –
step_style (str) –
Method to obtain a representative step if x is not evenly spaced. Valid entries: ‘median’ [default], ‘mean’, ‘mode’ or ‘max’ The mode is the most frequent entry in a dataset, and may be a good choice if the timeseries is nearly equally spaced but for a few gaps.
Max is a conservative choice, appropriate for binning methods and Gaussian kernel coarse-graining
- Returns
start (float) – min(x)
stop (float) – max(x)
step (float) – The representative spacing between consecutive values, computed as above