Compute a drought-index spike count from dated NDVI and LST rasters by pairing same-date files, generating TVDI rasters for each timestamp, averaging each TVDI raster to a time series, and counting spikes in that series.
Use when a task asks for drought-index spike/peak/event counts from multi-date NDVI and LST rasters.
Canonical sequence:
get_filelist(dir_path=data_dir)_LST.tif and _NDVI.tif by shared YYYY-MM-DD; keep only same-date pairs.data_dir.questionX/tvdi_YYYY-MM-DD.tif.compute_tvdi exactly once with parallel lst_path, ndvi_path, and output_path lists.calc_batch_image_mean(file_list=tvdi_outputs).count_spikes_from_values(values=means).Defaults:
null means; do not impute or drop unless the prompt instructs otherwise.Strict failure policy:
read_file to check raster existence in this workflow.compute_tvdi call.compute_tvdi fails with list-path parsing, invalid path or file, or similar interface ambiguity despite fully qualified same-date path lists built from get_filelist, treat it as a tool/environment blocker and stop with a precise message.run_python_script unless this skill explicitly documents an exact supported invocation; it does not.Example path construction:
data_dir = benchmark/data/question3get_filelist: Yellow River basin_2023-06-10_LST.tifbenchmark/data/question3/Yellow River basin_2023-06-10_LST.tifquestion3/tvdi_2023-06-10.tifSee references/REFERENCE.md for the exact call pattern and blocker wording.