ts_pad (pyleoclim.utils.filter.ts_pad)

pyleoclim.utils.filter.ts_pad(ys, ts, method='reflect', params=(1, 0, 0), reflect_type='odd', padFrac=0.1)[source]

Pad a timeseries based on timeseries model predictions

Parameters
  • ys (numpy array) – Evenly-spaced timeseries

  • ts (numpy array) – Time axis

  • method (string) – The method to use to pad the series - ARIMA: uses a fitted ARIMA model - reflect (default): Reflects the time series around either end.

  • params (tuple ARIMA model order parameters (p,d,q), Default corresponds to an AR(1) model) –

  • reflect_type (string) – {‘even’, ‘odd’}, optional Used in ‘reflect’, and ‘symmetric’. The ‘even’ style is the default with an unaltered reflection around the edge value. For the ‘odd’ style, the extented part of the array is created by subtracting the reflected values from two times the edge value. For more details, see np.lib.pad()

  • padFrac (float) – padding fraction (scalar) such that padLength = padFrac*length(series)

Returns

  • yp (array) – padded timeseries

  • tp (array) – augmented time axis