yatsm.mapping.phenology module

Functions relevant for mapping phenology fit information

yatsm.mapping.phenology.get_phenology(date, result_location, image_ds, after=False, before=False, qa=False, ndv=-9999, pattern='yatsm_r*', warn_on_empty=False)[source]

Output a raster containing phenology information

Phenology information includes spring_doy, autumn_doy, pheno_cor, peak_evi, peak_doy, and pheno_nobs.

Parameters:
  • date (int) – Ordinal date for prediction image
  • result_location (str) – Location of the results
  • image_ds (gdal.Dataset) – Example dataset
  • after (bool, optional) – If date intersects a disturbed period, use next available time segment
  • before (bool, optional) – If date does not intersect a model, use previous non-disturbed time segment
  • qa (bool, optional) – Add QA flag specifying segment type (intersect, after, or before)
  • ndv (int, optional) – NoDataValue
  • pattern (str, optional) – filename pattern of saved record results
  • warn_on_empty (bool, optional) – Log warning if result contained no result records (default: False)
Returns:

A tuple (np.ndarray, list) containing the 3D np.ndarray of the

phenology metrics, and the band names for the output dataset

Return type:

tuple