Learn R Programming

sits (version 1.12.0)

sits_sgolay: Smooth the time series using Savitsky-Golay filter

Description

The algorithm searches for an optimal polynomial describing the warping. The degree of smoothing depends on the filter order (usually 3.0). Use lambda = 0.5 for very slight smoothing and lambda = 5.0 for strong smoothing.

Usage

sits_sgolay(data.tb = NULL, order = 3, scale = 1,
  bands_suffix = "sg")

Arguments

data.tb

A tibble with time series data and metadata.

order

Filter order (integer).

scale

Time scaling (integer).

bands_suffix

Suffix to be appended to the smoothed filters.

Value

A tibble with smoothed sits time series.

Examples

Run this code
# NOT RUN {
#' # Retrieve a time series with values of NDVI
data(point_ndvi)
# Filter the point using the Savitsky Golay smoother
point_sg.tb <- sits_sgolay (point_ndvi, order = 3, scale = 2)
# Plot the two points to see the smoothing effect
sits_plot(sits_merge(point_ndvi, point_sg.tb))
# }

Run the code above in your browser using DataLab