Filter a time series RasterBrick or RasterStack using a static or statistical threshold in a defined historical period
cleanBrick(x, monperiod, thresh, dates = NULL, is.max = FALSE, ...)
RasterBrick or RasterStack. Raster time series to be cleaned
Numeric. Beginning of intended monitoring period in bfmSpatial
in the form c(year, Julian day)
. The filter will only be applied before this period (ie. to the history period). If set to NULL
, the filter will be applied to the entire time series.
Either a Numeric static threshold or "IQR"
to calcalate the threshold per pixel based on the interquartile zone.
Date. Vector of dates corresponding exactly to layers in x. If NULL
, dates are either extracted from sceneID
or names(x)
using getSceneinfo
.
Logical. Is thresh
to be treated as a maximum threshold (ie. all values higher will be removed)? If FALSE
, all values lower than thresh
will be removed (default).
Additional parameters to pass to mc.calc
Character. Vector of Landsat sceneID's
RasterBrick with values removed according to thresh
.
If dates
is not supplied, these will be extracted from sceneID's, with only support for Landsat at this time. If data come from another sensor, be sure to supply a dates
vector.