interpolated_timeseries
- eolab.georastertools.processing.algo.interpolated_timeseries(dates: MaskedArray, series: MaskedArray, output_dates: array, nodata) ndarray[source]
Interpolate a timeseries of data. Dates and series must be sorted in ascending order.
- Parameters:
dates (numpy.ma.masked_array) – A masked array of timestamps (dates) corresponding to the input series. Should be in ascending order.
series (numpy.ma.masked_array) – A list of 3D masked arrays, each with shape (bands, height, width), containing the raster data for each timestamp in dates.
output_dates (numpy.array) – A 1D array of timestamps for which to generate the interpolated rasters.
nodata (float) – Value to use for pixels where input data is NaN or missing.
- Returns:
- A 4D numpy array of shape (time, bands, height, width), containing
the interpolated raster data for each output date. If there are no valid data points for a specific pixel, the corresponding pixel will be filled with nodata.
- Return type:
- Raises:
ValueError – If series is empty, or if dates and series dimensions do not match.