grid_properties (pyleoclim.utils.tsutils.grid_properties)

pyleoclim.utils.tsutils.grid_properties(x, step_style='median')[source]
Establishes the grid properties 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