extract_pheno: Extract phenological metrics

View source: R/extract_pheno.R

extract_phenoR Documentation

Extract phenological metrics

Description

Extract phenological metrics from a fitted time series.

Usage

extract_pheno(data, method = "trs", trs = 0.5, ...)

Arguments

data

List of fitted time series as generated by function fit_curve().

method

Thresholding method among "trs", "derivatives", "klosterman" and "gu" (see phenopix::PhenoExtract()).

trs

Argument passed to phenopix::PhenoExtract() if method = "trs". It is valid also for method = "derivatives" thanks to a {sen2rts} implementation (it will be documented soon). Other methods do not make use of this argument.

...

Additional arguments passed to phenopix::PhenoExtract().

Value

A data table with the following fields:

  • id: the time series ID (see s2ts);

  • year: the year (integer);

  • cycle: the cycle ID (integer);

  • begin, end, maxval: the dates of begin, end and maximum value in the cycle as computed by cut_cycles();

  • other phenology metrics, depending on method:

    • if method = "trs" or "derivatives": sos, eos, los, pop, mgs, rsp, rau, peak, msp, mau (see phenopix::PhenoTrs() or phenopix::PhenoDeriv());

    • if method = "gu": UD, SD, DD, RD, maxline, baseline, prr, psr, plateau.slope (see phenopix::PhenoGu());

    • if method = "klosterman": Greenup, Maturity, Senescence, Dormancy (see phenopix::PhenoKl()).

Author(s)

Luigi Ranghetti, PhD (2020) luigi@ranghetti.info

Examples

# Load input data
data("cf")
data("ts_filled") # used for plots

# Default extraction ("trs" method with 50% threshold)
dt_pheno <- extract_pheno(cf)
plot(ts_filled, fitted = cf, pheno = dt_pheno, plot_dates = TRUE)


# Customize parameters (e.g. "derivatives" method with 30% threshold)
dt_pheno_2 <- extract_pheno(cf, method = "derivatives", trs = 0.3)
plot(ts_filled, fitted = cf, pheno = dt_pheno_2, plot_dates = TRUE)

# Other methods: Klosterman
dt_pheno_kl <- extract_pheno(cf, method = "klosterman")
plot(ts_filled, fitted = cf, pheno = dt_pheno_kl, plot_dates = TRUE)

# Other methods: Gu
dt_pheno_gu <- extract_pheno(cf, method = "gu")
plot(ts_filled, fitted = cf, pheno = dt_pheno_gu, plot_dates = TRUE)


ranghetti/sen2rts documentation built on March 31, 2024, 1:18 a.m.