Skip to content

PhytKit

Plant physiology model fitting for you and your agent

Fit photosynthesis, stomatal conductance, hydraulic vulnerability, pressure–volume and soil water retention models to your measurements, and correct LI-600 porometer data.

pip install phytkit

What it does

  • Fit photosynthesis curves

    Fit A–Ci, light and temperature responses with the Farquhar–von Caemmerer–Berry C3 model, the von Caemmerer C4 model, or an empirical model. Read LI-6800 logs and .xlsx exports directly, with one curve per leaf or many pooled under a CurveID.

  • Correct LI-600 conductance

    Apply the Rizzo & Bailey (2025) energy-balance correction to LI-600 porometer readings. The porometer ignores evaporative cooling in its chamber, so it overestimates conductance, most at high gsw.

  • Estimate A from porometry

    Solve net assimilation, Ci and Cc for every porometer reading from its conductance, light and leaf temperature and a photosynthesis parameter set.

  • Fit stomatal models

    Fit the Buckley–Turnbull–Adams (2012) and Medlyn et al. (2011) stomatal conductance models to gas exchange or porometry data.

  • Fit water relations

    Fit xylem vulnerability curves and pressure–volume curves, reporting P50, Kmax and the turgor loss point, plus five soil water retention models.

  • Fit many curves at once

    Fit a folder of files, or split one file by a column such as Leaf, in a single command. From Python, fit thousands of datasets in parallel across your CPU cores.

  • Built for scripts and agents

    Every command prints one JSON object, errors are structured, and pk describe lists every model, parameter, bound and constraint, so scripts and coding agents can discover what to pass.

  • Use it from Python

    import phytkit runs the same code as the command line and returns the same results as Python dictionaries, plus functions for data already in memory.

Get started

New to PhytKit? Start with Install PhytKit, then Your first fit.

Looking for something specific?

  • Workflows walk through common tasks step by step.
  • Concepts explain the models and how fitting works.
  • Reference lists every command, option, model and parameter.

Credits

The original version of PhytKit was developed primarily by Kyle Rizzo (@ktrizzo). It is maintained by the PlantSimulationLab.