Learn R Programming

phenofit

A state-of-the-art remote sensing vegetation phenology extraction package: phenofit

  • phenofit combine merits of TIMESAT and phenopix
  • A simple and stable growing season dividing method was proposed
  • Provide a practical snow elimination method based on Whittaker
  • 7 curve fitting methods and 4 phenology extraction methods
  • We add parameters boundary for every curve fitting method according to their ecological meaning.
  • optimx is used to select the best optimization method for different curve fitting methods.

Task lists

  • Test the performance of phenofit in multiple growing seasons regions (e.g., the North China Plain);
  • Uncertainty analysis of curve fitting and phenological metrics;
  • shiny app has been moved to phenofit.shiny;
  • Complete script automatic generating module in shinyapp;
  • Rcpp improve double logistics optimization efficiency by 60%;
  • Support spatial analysis;
  • Support annual season in curve fitting;
  • flexible fine fitting input ( original time-series or smoothed time-series by rough fitting).
  • Asymmetric Threshold method

Installation

You can install phenofit from github with:

# install.packages("remotes")
remotes::install_github("eco-hydro/phenofit")

Note

Users can through the following options to improve the performance of phenofit in multiple growing season regions:

  • Users can decrease those three parameters nextend, minExtendMonth and maxExtendMonth to a relative low value, by setting option set_options(fitting = list(nextend = 1, minExtendMonth = 0, maxExtendMonth = 0.5)).

  • Use wHANTS as the rough fitting function. Due to the nature of Fourier functions, wHANTS is more stable for multiple growing seasons, but it is less flexible than wWHIT. wHANTS is suitable for regions with the static growing season pattern across multiple years, wWHIT is more suitable for regions with the dynamic growing season pattern. Dynamic growing season pattern is the most challenging task, which also means that a large uncertainty might exist.

    When using wHANTS as the rough fitting function, r_min is suggested to be set as zero.

  • Use only one iteration in the fine fitting procedure.

References

[1] Kong, D., McVicar, T. R., Xiao, M., Zhang, Y., Peña-Arancibia, J. L., Filippa, G., Xie, Y., Gu, X. (2022). phenofit: An R package for extracting vegetation phenology from time series remote sensing. Methods in Ecology and Evolution, 13, 1508-1527. https://doi.org/10.1111/2041-210X.13870

[2] Kong, D., Zhang, Y.*, Wang, D., Chen, J., & Gu, X*. (2020). Photoperiod Explains the Asynchronization Between Vegetation Carbon Phenology and Vegetation Greenness Phenology. Journal of Geophysical Research: Biogeosciences, 125(8), e2020JG005636. https://doi.org/10.1029/2020JG005636

[3] Kong, D., Zhang, Y.*, Gu, X., & Wang, D. (2019). A robust method for reconstructing global MODIS EVI time series on the Google Earth Engine. ISPRS Journal of Photogrammetry and Remote Sensing, 155, 13–24.

[4] Kong, D., (2020). R package: A state-of-the-art Vegetation Phenology extraction package, phenofit version 0.3.5, https://doi.org/10.5281/zenodo.6320537

[5] Zhang, Q.*, Kong, D.*, Shi, P., Singh, V.P., Sun, P., 2018. Vegetation phenology on the Qinghai-Tibetan Plateau and its response to climate change (1982–2013). Agricultural and Forest Meteorology. 248, 408–417. https://doi.org/10.1016/j.agrformet.2017.10.026

Acknowledgements

Keep in mind that this repository is released under a GPL2 license, which permits commercial use but requires that the source code (of derivatives) is always open even if hosted as a web service.

Copy Link

Version

Install

install.packages('phenofit')

Monthly Downloads

670

Version

0.3.11

License

GPL-2 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Dongdong Kong

Last Published

January 23rd, 2026

Functions in phenofit (0.3.11)

add_HeadTail

Add one year data in the head and tail
R2_sign

Critical value of determined correlation
curvefit

Fine curve fitting
curvefit0

curvefit0
get_GOF

get_GOF
getRealDate

getRealDate
check_ylu

check_ylu
check_input

check_input
PhenoKl

Phenology extraction in Inflection method (Zhang)
cv_coef

weighted CV
PhenoTrs

Phenology extraction in Threshold method (TRS)
cutoff

cutoff
fFIT

S3 class of fine curve fitting object.
init_param

init_param
input_single

input object with one growing season per year
fFITs

S3 class of multiple fine curve fittings object.
get_param

Get parameters from curve fitting result
plot_season

plot_season
melt_list

melt_list
process_phenofit

Extract Vegetation Phenology at site scale
get_fitting

getFittings
curvefits

Fine Curve fitting
D

D
CA_NS6

MOD13A1 EVI observations at flux site CA-NS6
plot_input

Plot INPUT returned by check_input
Logistic

Fine fitting functions
curvefits_LocalModel

curvefits by local model functions of TIMESAT
logistic

Double logistics in Rcpp
removeClosedExtreme

rm too closed peaks or troughs
movmean

movmean
reexports

Objects exported from other packages
roughFit

Rough fitting
season

Growing season division
opt_FUN

Unified optimization function
get_pheno

get_pheno
findpeaks

findpeaks
init_lambda

Initial lambda value of Whittaker smoother
find_season.peaks

find_season
rcpp_wSG

Weighted Savitzky-Golay written in RcppArmadillo
rcpp_season_filter

season_filter
season_input

Growing season division (unstable version)
plot_phenofit

plot_phenofit
smooth_wSG

Weighted Savitzky-Golay
v_curve

V-curve theory to optimize Whittaker parameter lambda.
wSELF

Weight updating functions
optim_pheno

optim_pheno
qc_sentinel2

Initial weights for sentinel2 according to SCL band
qc_levels

qc level, color and shape
smooth_wHANTS

Weighted HANTS SMOOTH
smooth_wWHIT

Weigthed Whittaker Smoother
set_options

set and get phenofit option
whit2

Weighted Whittaker smoothing with a second order finite difference penalty
lambda_vcurve

lambda_vcurve
season_mov

Moving growing season division
f_goal2

objective function of double logistics
brks2rfit

get rough fitting
f_goal

Goal function of fine curve fitting methods
check_GS_HeadTail

Check growing season head and tail minimum values
qcFUN

Initial weights according to qc
plot_curvefits

plot_curvefits
tidy_MOD13

tidy_MOD13
kurtosis

skewness and kurtosis
tidy_pheno

tidy_pheno
process_season

divide_seasons
phenofit

phenofit
PhenoDeriv

Phenology extraction in Derivative method (DER)
PhenoGu

Phenology extraction in GU method (GU)
I_optim

Interface of unified optimization functions.
FitDL

Fine fitting
GOF

GOF
MOD13A1

MOD13A1