| sits_sgolay {sits} | R Documentation |
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_sgolay( data = NULL, order = 3, length = 5, scaling = 1, bands_suffix = "sg" )
data |
A tibble with time series data and metadata. |
order |
Filter order (integer). |
length |
Filter length (must be odd) |
scaling |
Time scaling (integer). |
bands_suffix |
Suffix to be appended to the smoothed filters. |
A tibble with smoothed sits time series.
A. Savitzky, M. Golay, "Smoothing and Differentiation of Data by Simplified Least Squares Procedures". Analytical Chemistry, 36 (8): 1627–39, 1964.
#' # 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, sits_sgolay(order = 3, length = 5)) # Plot the two points to see the smoothing effect plot(sits_merge(point_ndvi, point_sg))