Skip to main content

Fit moisture sorption isotherm models (GAB, BET, Peleg) and estimate food stability from experimental water activity data.

Project description

isotherm-fit

License: MIT Status DOI

Automated fitting of moisture sorption isotherm models (GAB, BET, Peleg) to experimental water activity data, with objective model selection and food-stability assessment via the monolayer moisture content (m₀).

Problem

Moisture sorption isotherms — the relationship between equilibrium moisture content and water activity (a_w) — underpin drying process design, storage stability prediction, and shelf-life estimation in food science. Researchers typically measure a handful of (a_w, moisture) points with the saturated salt solution method and then fit models (GAB, BET, Oswin, Henderson, Peleg) by hand in spreadsheets or proprietary software — a slow, inconsistent process. isotherm-fit automates model fitting, objective model selection (AIC), and stability-relevant parameter extraction, producing a publication-ready report.

Installation

pip install isotherm-fit

Or from source:

git clone https://github.com/karenkhachatryan-lab/isotherm-fit.git
cd isotherm-fit
pip install -e ".[dev]"

Usage

Input CSV with columns aw, moisture (g water / 100 g dry solid or kg/kg), and optionally moisture_std:

aw,moisture,moisture_std
0.113,3.21,0.08
0.225,4.85,0.10
0.328,6.02,0.09
...

Fit models and generate a report:

isotherm-fit fit data.csv --output report

This produces:

  • report.pdf — isotherm plot with all fitted model curves, parameter/metrics table, stability zone, residuals plot for the best model,
  • report.json — fitted parameters, metrics (R², RMSE, AIC), and m₀ for downstream use (e.g. drying simulations).

Print citation information:

isotherm-fit cite

Desktop GUI (optional)

pip install "isotherm-fit[gui]"
isotherm-fit gui

Opens a desktop window (CustomTkinter) to load a CSV, pick models, view the report plot and metrics live, and save the PDF/PNG/JSON outputs — no command-line arguments needed.

For users without Python, a prebuilt standalone Windows GUI is attached as a .zip to each GitHub Release — download, extract, and run isotherm-fit-gui.exe, no installation needed. To build it yourself instead, see packaging/build_exe.ps1 (PyInstaller) in docs/installation.md.

Project status

Early development (v0.2.0) — MVP scope: GAB, BET, Peleg models; CSV loader; AIC-based model selection; PDF/PNG + JSON report generation; CLI via Typer; optional CustomTkinter desktop GUI. See CHANGELOG once released.

Citing this software

If you use isotherm-fit in your research, please cite it — see CITATION.cff or run isotherm-fit cite for the formatted citation and BibTeX entry. DOI: 10.5281/zenodo.21710137.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isotherm_fit-0.2.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isotherm_fit-0.2.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file isotherm_fit-0.2.0.tar.gz.

File metadata

  • Download URL: isotherm_fit-0.2.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for isotherm_fit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2d1e195e52494470af4a5574f88b3b9f0317c34ff4e0c9fac3fcab66c08e1852
MD5 63cbcffd911e89ce11d3a3f06b63e15a
BLAKE2b-256 2c7773d86c1342bc230fef02cc4090a2018727088658f587ab35fc8ae9626cbf

See more details on using hashes here.

File details

Details for the file isotherm_fit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: isotherm_fit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for isotherm_fit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa0b8fbff43f31af107d16a76fc734e6a31566e817d1563ecfffe2378df56f1
MD5 0c635bcf5379ffd5248b4655f5dc2684
BLAKE2b-256 0f94f5f03223b3340d4268190d8d0d55fe50ff24bcef834c6fdde18a94d36490

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page