Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TDP Sapflow Analysis Skill

A portable Codex skill for comparing two thermal-dissipation sapflow sensors, inspecting raw dT/mV signals, recalculating sap velocity, and comparing dTmax methods from TOA5-style logger data.

Features

  • Reads TOA5-style .dat files with explicit timestamp and numeric coercion.
  • Compares two configurable raw dT/mV channels over an absolute analysis window.
  • Calculates Granier-type sap velocity from raw dT.
  • Supports daily-max interpolation, predawn-window maximum, and optional logger-saved dTmax.
  • Produces auditable CSV files, PNG plots, and report-ready summaries.
  • Keeps data paths, channel names, sensor labels, and saved dTmax fields configurable.

Repository Structure

.
├── SKILL.md
├── agents/
│   └── openai.yaml
├── references/
│   └── workflow.md
├── scripts/
│   ├── plot_tdp_delta_analysis_window.py
│   └── compute_tdp_sap_velocity.py
└── tests/
    └── test_scripts.py

Requirements

  • Python 3.10 or newer
  • Matplotlib

Install the runtime dependency with:

python -m pip install matplotlib

Install as a Codex Skill

Clone this repository into your Codex skills directory so that SKILL.md is at the top level of the installed skill:

git clone <repository-url> <codex-skills-directory>/tdp-sapflow-analysis

Analysis Confirmation

Before analysis, the skill asks only for missing items:

  1. Data file or dataset.
  2. Sensor A and Sensor B column mapping.
  3. Absolute analysis start and end timestamps.
  4. Raw dT comparison, sap-velocity calculation, or both.
  5. dTmax method selection.
  6. Whether available logger-saved dTmax columns should be included.

Generic Input Fields

The bundled scripts use portable defaults:

Purpose Default field Override option
Sensor A raw dT sensor_a_dt --sensor-a-col
Sensor B raw dT sensor_b_dt --sensor-b-col
Sensor A saved dTmax sensor_a_saved_dtmax --sensor-a-saved-dtmax-col
Sensor B saved dTmax sensor_b_saved_dtmax --sensor-b-saved-dtmax-col

Pass the actual dataset fields at runtime when they differ from these defaults.

Raw dT Comparison

From the repository root:

python scripts/plot_tdp_delta_analysis_window.py --data path/to/data.dat --analysis-start "YYYY-MM-DD HH:MM:SS" --analysis-end "YYYY-MM-DD HH:MM:SS" --sensor-a-col sensor_a_dt --sensor-b-col sensor_b_dt

Default outputs:

  • tdp_delta_analysis_window.png
  • tdp_delta_analysis_window_summary.csv

Sap-Velocity Recalculation

python scripts/compute_tdp_sap_velocity.py --data path/to/data.dat --analysis-start "YYYY-MM-DD HH:MM:SS" --analysis-end "YYYY-MM-DD HH:MM:SS" --methods method1_daily_max_interpolated method2_predawn_window_max

Available dTmax methods:

  • method1_daily_max_interpolated
  • method2_predawn_window_max
  • logger_saved_dtmax

Default outputs:

  • tdp_sap_velocity_results.csv
  • tdp_dtmax_summary.csv
  • tdp_sap_velocity_summary.csv
  • tdp_methods_by_sensor.png
  • tdp_sensors_by_method.png

Validation

Run the bundled tests from the repository root:

python -m unittest discover -s tests -v

About

A portable Codex skill for comparing two thermal-dissipation sapflow sensors, inspecting raw dT/mV signals, recalculating sap velocity, and comparing dTmax methods from TOA5-style logger data.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages