clean_ts (pyleoclim.utils.tsbase.clean_ts)

pyleoclim.utils.tsbase.clean_ts(ys, ts, verbose=False)[source]

Cleaning the timeseries

Delete the NaNs in the time series and sort it with time axis ascending, duplicate timestamps will be reduced by averaging the values.

Parameters
  • ys (array) – A time series, NaNs allowed

  • ts (array) – The time axis of the time series, NaNs allowed

Returns

  • ys (array) – The time series without nans

  • ts (array) – The time axis of the time series without nans