smooth_wHANTS: Weighted HANTS SMOOTH

Description Usage Arguments Value Author(s) Examples

View source: R/smooth_wHANTS.R

Description

Weighted HANTS smoother

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
smooth_wHANTS(
  y,
  t,
  w,
  nf = 3,
  ylu,
  periodlen = 365,
  nptperyear,
  wFUN = wTSM,
  iters = 2,
  wmin = 0.1,
  ...
)

Arguments

y

Numeric vector, vegetation index time-series

t

Numeric vector, Date variable

w

(optional) Numeric vector, weights of y. If not specified, weights of all NA values will be wmin, the others will be 1.0.

nf

number of frequencies to be considered above the zero frequency

ylu

[low, high] of time-series y (curve fitting values are constrained in the range of ylu.

periodlen

length of the base period, measured in virtual samples (days, dekads, months, etc.). nptperyear in timesat.

nptperyear

Integer, number of images per year.

wFUN

weights updating function, can be one of 'wTSM', 'wChen' and 'wBisquare'.

iters

How many times curve fitting is implemented.

wmin

Double, minimum weigth (i.e. weight of snow, ice and cloud).

...

Additional parameters are passed to wFUN.

Value

Author(s)

Wout Verhoef, NLR, Remote Sensing Dept. June 1998 Mohammad Abouali (2011), Converted to MATLAB Dongdong Kong (2018), introduced to R and modified into weighted model.

Examples

1
2
3
4
5
6
7
library(phenofit)
data("MOD13A1")
dt <- tidy_MOD13.gee(MOD13A1$dt)
d <- dt[site == "AT-Neu", ]

l <- check_input(d$t, d$y, d$w, nptperyear=23)
r_wHANTS <- smooth_wHANTS(l$y, l$t, l$w, ylu = l$ylu, nptperyear = 23, iters = 2)

phenofit documentation built on April 2, 2020, 5:07 p.m.