| set_options {phenofit} | R Documentation |
set and get phenofit option
Description
set and get phenofit option
Usage
set_options(..., options = NULL)
get_options(names = NULL)
Arguments
... |
list of phenofit options FUN_season: character, |
options |
If not NULL,
|
names |
vector of character, names of options |
options for season
(a) Parameters for rough fitting
-
rFUN: character (defaultsmooth_wWHIT), the name of rough curve fitting function, can be one ofc("smooth_wSG", "smooth_wWHIT", "smooth_wHANTS"), which are corresponding tosmooth_wSG(),smooth_wWHIT()andsmooth_wHANTS(). -
wFUN: character (defaultwTSM), the name of weights updating functions, can be one of c("wTSM", "wChen", "wBisquare", "wSELF"). SeewTSM(),wChen(),wBisquare()andwSELF()for details. -
iters: integer (default 2), the number of rough fitting iterations. -
wmin: double, the minimum weight of bad points (i.e. snow, ice and cloud). -
verbose: logical (defaultFALSE). IfTRUE,options$seasonwill be printed on the console. -
lambda: double (default NULL), the smoothing parameter ofsmooth_wWHIT().If
lambda = NULL, V-curve theory will be employed to find the optimallambda. Seelambda_vcurve()for details.
-
frame: integer (default NULL), the parameter ofsmooth_wSG(), moving window size.If
frame = NULL,framewill be reset asfloor(nptperyear/5)*2 + 1(refered by TIMESAT).
-
nf: integer (default 4), the number of frequencies insmooth_wHANTS(). -
maxExtendMonth: integer (default 12), previous and subsequentmaxExtendMonth(in month) data were added to the current year for rough fitting. -
nextend: integer (default NULL), same asmaxExtendMonth, but in points.If
nextendprovided,maxExtendMonthwill be ignored.If
nextend = NULL,nextendwill be reset asceiling(maxExtendMonth/12*nptperyear)
(b) Parameters for growing season division
-
minpeakdistance: double (default NULL), the minimum distance of two peaks (in points). If the distance of two maximum extreme value less thanminpeakdistance, only the maximum one will be kept.If
minpeakdistance = NULL, it will be reset asnptperyear/6.
-
r_max: double (default 0.2; in (0, 1)).r_maxandr_minare used to eliminate fake peaks and troughs.The real peaks should satisfy:
-
max(h_{peak, L}, h_{peak, R}) > r_{max} A -
min(h_{peak, L}, h_{peak, R}) > r_{min} A,whereh_{peak, L}, h_{peak, R}are height difference from the peak to the left- and right-hand troughs.
-
The troughs should satisfy:
-
max(h_{trough, L}, h_{trough, R}) > r_{max} A,whereh_{trough, L}, h_{trough, R}are height difference from the trough to the left- and right-hand peaks.
-
-
r_min: double (default 0.05; in (0, 1)), see abover_maxfor details.r_min<r_max. -
rtrough_max: double (default 0.6, in (0, 1)),y_{peak} <= rtrough_max * A + ylu[1]. -
ypeak_min: double 0.1 (in VI unit),y_{peak} >= ypeak_min. -
.check_season: logical (defaultTRUE). check the growing season length according tolen_minandlen_max. IfFALSE,len_minandlen_maxwill lose their effect. -
len_min: integer (default 45), the minimum length (in days) of growing season -
len_max: integer (default 650), the minimum length (in days) of growing season -
adj.param: logical. IfTRUE(default), if there are too many or too less peaks and troughs,phenofitwill automatically adjust rough curve fitting function parameters. SeeMaxPeaksPerYearandMaxTroughsPerYearfor details. -
MaxPeaksPerYear(optional) : integer (default 2), the max number of peaks per year. IfPeaksPerYear>MaxPeaksPerYear, thenlambda = lambda*2. -
MaxTroughsPerYear(optional) : integer (default 3), the max number of troughs per year. IfTroughsPerYear>MaxTroughsPerYear, thenlambda = lambda*2. -
calendarYear: logical (defaultFALSE). IfTRUE, the start and end of a calendar year will be regarded as growing season division (North Hemisphere is from 01 Jan to 31 Dec; South Hemisphere is from 01 Jul to 30 Jun). -
rm.closed: logical (defaultTRUE). IfTRUE, closed peaks (or troughs) will be further tidied. Only the maximum -
is.continuous(not used): logical (defaultTRUE). This parameter is forfluxnet2015fluxsite data, where the input might be not continuous.
options for fitting
-
methods(defaultc('AG', 'Beck', 'Elmore', 'Zhang')``): Fine curve fitting methods, can be one or more of c('AG', 'Beck', 'Elmore', 'Zhang', 'Gu', 'Klos')‘. Note that ’Gu' and 'Klos' are very slow. -
iters(default 2): max iterations of fine fitting. -
wFUN(defaultwTSM): Character or function, weights updating function of fine fitting function. -
wmin(default 0.1): min weights in the weights updating procedure. -
use.rough(default FALSE): Whether to use rough fitting smoothed time-series as input? Iffalse, smoothed VI by rough fitting will be used for Phenological metrics extraction; Iftrue, original inputywill be used (rough fitting is used to divide growing seasons and update weights. -
use.y0(default TRUE): boolean. whether to use originaly0as the input ofplot_input, note that not for curve fitting.y0is the original value before the process ofcheck_input. -
nextend(default 2): Extend curve fitting window, untilnextendgood or marginal points are found in the previous and subsequent growing season. -
maxExtendMonth(default 1): Search good or marginal good values in previous and subsequentmaxExtendMonthperiod. -
minExtendMonth(default 0.5): Extend period defined bynextendandmaxExtendMonth, should be no shorter thanminExtendMonth. When all points of the input time-series are good value, then the extending period will be too short. In that situation, we can't make sure the connection between different growing seasons is smoothing. -
minPercValid: (default 0, not use). If the percentage of good- and marginal- quality points is less thanminPercValid, curve fiting result is set toNA. -
minT: (not use). IfTnnot provided inINPUT,minTwill not be used.minTuse night temperature Tn to define backgroud value (days withTn < minTtreated as ungrowing season).
Examples
set_options(verbose = FALSE)
get_options("season") %>% str()