| sits_filters {sits} | R Documentation |
Filtering functions should be used with 'sits_filter()'. The following filtering functions is supported by 'sits':
'sits_sgolay()': An optimal polynomial for warping a time series. The degree of smoothing depends on the filter order (usually 3.0). The order of the polynomial uses the parameter 'order' (default = 3), the size of the temporal window uses the parameter 'length' (default = 5), and the temporal expansion uses the parameter 'scaling'.
'sits_whittaker()': The algorithm searches for an optimal warping polynomial. The degree of smoothing depends on smoothing factor lambda (usually from 0.5 to 10.0). Use lambda = 0.5 for very slight smoothing and lambda = 5.0 for strong smoothing.
'sits_filter()': applies a filter to all bands.
sits_sgolay(data = NULL, order = 3, length = 5, scaling = 1) sits_whittaker(data = NULL, lambda = 0.5) sits_filter(data, filter = sits_whittaker())
data |
A time series vector or matrix. |
order |
Filter order (integer). |
length |
Filter length (must be odd) |
scaling |
Time scaling (integer). |
lambda |
Smoothing factor to be applied (default 0.5). |
filter |
a filter function such as 'sits_whittaker()' or 'sits_sgolay()'. |
A set of filtered time series
Rolf Simoes, rolf.simoes@inpe.br
Gilberto Camara, gilberto.camara@inpe.br
Felipe Carvalho, felipe.carvalho@inpe.br
A. Savitzky, M. Golay, "Smoothing and Differentiation of Data by Simplified Least Squares Procedures". Analytical Chemistry, 36 (8): 1627–39, 1964.
Francesco Vuolo, Wai-Tim Ng, Clement Atzberger, "Smoothing and gap-filling of high resolution multi-spectral timeseries: Example of Landsat data", Int Journal of Applied Earth Observation and Geoinformation, vol. 57, pg. 202-213, 2107.
# Retrieve a time series with values of NDVI
point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
# Filter the point using the Savitsky Golay smoother
point_sg <- sits_filter(point_ndvi,
filter = sits_sgolay(order = 3, length = 5))
# Merge time series
point_ndvi <- sits_merge(point_ndvi, point_sg, suffix = c("", ".SG"))
# Plot the two points to see the smoothing effect
plot(point_ndvi)
# Retrieve a time series with values of NDVI
point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
# Filter the point using the Whittaker smoother
point_wt <- sits_filter(point_ndvi, filter = sits_whittaker(lambda = 3))
# Merge time series
point_ndvi <- sits_merge(point_ndvi, point_wt, suffix = c("", ".WT"))
# Plot the two points to see the smoothing effect
plot(point_ndvi)