Weighted Savitzky-Golay
smooth_wSG( y, w, nptperyear, ylu, wFUN = wTSM, iters = 2, frame = floor(nptperyear/7) * 2 + 1, d = 2, ... )
y | Numeric vector, vegetation index time-series |
---|---|
w | (optional) Numeric vector, weights of |
nptperyear | Integer, number of images per year. |
ylu | (optional) |
wFUN | weights updating function, can be one of 'wTSM', 'wChen' and 'wBisquare'. |
iters | How many times curve fitting is implemented. |
frame | Savitzky-Golay windows size |
d | polynomial of degree. When d = 1, it becomes moving average. |
... | Additional parameters are passed to |
ws
: weights of every iteration
zs
: curve fittings of every iteration
Chen, J., J\"onsson, P., Tamura, M., Gu, Z., Matsushita, B., Eklundh, L.,
2004. A simple method for reconstructing a high-quality NDVI time-series
data set based on the Savitzky-Golay filter. Remote Sens. Environ. 91,
332-344. https://doi.org/10.1016/j.rse.2004.03.014.
https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter
#> Error in library(phenofit): there is no package called ‘phenofit’#> Warning: data set ‘MOD13A1’ not found#> Error in tidy_MOD13(MOD13A1$dt): object 'MOD13A1' not foundd <- dt[site == "AT-Neu", ]#> Error in eval(expr, envir, enclos): object 'site' not found#> Error in check_input(d$t, d$y, d$w, nptperyear = 23): object 'd' not foundr_wSG <- smooth_wSG(l$y, l$w, l$ylu, nptperyear = 23, iters = 2)#> Error in smooth_wSG(l$y, l$w, l$ylu, nptperyear = 23, iters = 2): object 'l' not found