Isoconversional Kinetics Analyzer: Python Software for Activation Energy Calculation

🔬 Isoconversional Kinetics Analyzer

Professional Desktop App & Library for Non-Isothermal Kinetics (TGA/DSC)

MIT License Python 3.9+ Production Ready CustomTkinter 6 Methods Zero SciPy

📌 What is this tool?

Isoconversional Kinetics Analyzer is a complete, publication-grade toolkit for extracting the activation energy Eₐ(α) — and optionally the full kinetic triplet A(α), f(α) — from non-isothermal TGA/DSC experiments.

It ships as both a modern desktop GUI (with dark/light theme, live progress bars, and interactive plots) and a scriptable Python library, built entirely on NumPy + pandas with no SciPy dependency.

Target Users

  • Materials Scientists
  • Thermal Analysts (TGA/DSC)
  • Polymer & Chemical Engineers
  • Academic Researchers
  • Python Developers

Key Metrics

  • 6 Isoconversional Methods
  • 17 CR Models + 13 KTH Models
  • Publication-Ready Plots
  • Excel & Origin-Ready Exports
  • Confidence Bands & Lifetime Prediction

Architecture

Modular library-first architecture with separation of concerns:

Isoconversional-Kinetics-Analyzer/
├── run.py                    # convenience launcher
├── src/isokinetics/
│   ├── main.py               # entry point
│   ├── splash.py             # splash screen
│   ├── gui.py                # customtkinter GUI
│   ├── data_loader.py        # load / validate / interpolate
│   ├── kinetics.py           # 6 methods + Coats-Redfern + KTH full
│   ├── validation.py         # ground-truth validation
│   ├── lifetime.py           # Arrhenius shelf-life
│   ├── formatting.py         # number-format policy
│   ├── plotter.py            # matplotlib (theme-aware)
│   └── exporter.py           # PNG/SVG/PDF/TIFF + txt + xlsx
├── tests/                    # pytest suite (incl. ground-truth)
└── sample_data/

Modern GUI

Dark/light theme, sidebar workflow, summary cards, live progress bar, keyboard shortcuts.

Publication Plots

6 journal presets (ACS, RSC, Nature, Elsevier, Colorblind, Monochrome) with confidence bands.

Flexible Input

Text or Excel. Supports 5-column processed data or 4-column raw data with interactive alpha-grid dialog.

One-Click Export

Timestamped folder with PNG, SVG, PDF, TIFF, tab-delimited TXT (Origin-compatible), and multi-sheet Excel.

Validated Math

Synthetic ground-truth tests verify every method recovers a known Eₐ within 5–10%.

Lifetime Prediction

Arrhenius shelf-life extrapolation with Eₐ ±10% bounds and acceleration factor.

Library-First

Every module works standalone in scripts and Jupyter notebooks without the GUI.

Zero SciPy

Linear regression via numpy.polyfit; Vyazovkin minimisation via from-scratch golden-section search.

⚗️ The Six Methods

The software implements six isoconversional methods covering differential, integral, and non-linear approaches.

Friedman (Differential): ln(β·dα/dT) = ln(A·f(α)) − Eₐ/(RT)

FWO (Integral): ln(β) = const − 1.052·Eₐ/(RT)

KAS (Integral): ln(β/T²) = const − Eₐ/(RT)

Starink (Integral): ln(β/T^1.92) = const − 1.0008·Eₐ/(RT)

Vyazovkin (Non-linear): Minimises Φ(Eₐ) = ΣᵢΣⱼ≠ᵢ [J(Eₐ,Tᵢ)·βⱼ]/[J(Eₐ,Tⱼ)·βᵢ]

KTH (Original Differential): ln((αᵢ₊₁−αᵢ)/Δtᵢ) = ln(Φ(αᵢ)) − Eₐ/(R·T̄ᵢ)

📐 KTH Full Triplet (Malek's Method)

Recovers A(α) and f(α) via Malek's y(α)/z(α) master-plot identification against 13 candidate models (F0–F3, R2–R3, D1–D4, A2–A4) over α ∈ [0.2, 0.8]. Returns "unknown" when the best match is poor or ambiguous.

🔬 Honest Model Ranking (Coats-Redfern)

Does not rank by R² alone — that suffers from the kinetic compensation effect. Every candidate is screened against a model-free reference Eₐ (from Vyazovkin) and recommended only if R² > 0.99 AND within 20% of the reference.

📋 System Requirements

RequirementMinimumRecommended
Python3.93.12+
RAM2 GB4 GB
Disk100 MB300 MB
Display1280×7201920×1080

🐍 Dependencies

numpy==2.1.3 pandas==2.2.3 matplotlib==3.9.2 customtkinter openpyxl

🚀 Installation Commands

# Clone repository
git clone https://github.com/khadev/Isoconversional-Kinetics-Analyzer.git
cd Isoconversional-Kinetics-Analyzer

# Create virtual environment
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

# Install
pip install -r requirements.txt
pip install -e .

# Launch the GUI
isokinetics-gui             # or: python run.py

🐍 Python Script Example

You can use the library entirely independently of the GUI:

from isokinetics import data_loader, kinetics, plotter, exporter

# Load & preprocess
df = data_loader.load_data("sample_data/matric_121459.txt")
df = data_loader.interpolate_alpha(df)  # uniform α grid, step 0.01

betas = [5.0, 10.0, 20.0, 40.0]         # K/min

# Run all six methods
results = {
    "Friedman":   kinetics.friedman(df, betas),
    "FWO":        kinetics.fwo(df, betas),
    "KAS":        kinetics.kas(df, betas),
    "Starink":    kinetics.starink(df, betas),
    "Vyazovkin":  kinetics.vyazovkin(df, betas),
    "KTH":        kinetics.kth(df, betas),
}
averages = {name: kinetics.average_ea(res) for name, res in results.items()}
print(averages)

# Plot & export
fig = plotter.build_figure()
plotter.update_plot(fig, results, averages)
exporter.export_all("/path/to/output", results, fig)

📁 Input Format

A text file or Excel workbook, no header required:

αT₁ (β₁)T₂ (β₂)T₃ (β₃)T₄ (β₄)
0.01502.95518.85542.95587.91
0.02510.97527.29550.97593.09

✅ Ground-Truth Testing

The suite includes a synthetic ground-truth test: a first-order Arrhenius reaction with known Eₐ = 150 kJ/mol at four heating rates is fed through all six methods, each asserted to recover ≈150 kJ/mol within 5% (linear/differential) or 10% (Vyazovkin).

# Full suite (headless machines need Xvfb for GUI tests)
xvfb-run -a pytest tests/ -v

# Skip GUI smoke tests
pytest tests/ -v --ignore=tests/test_gui_smoke.py

# Standalone validation report
python -m isokinetics.validation

🤝 Contribution Guidelines

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 Code Style

  • Follow PEP 8 with 120 character line length
  • Use type hints for all function signatures
  • Add docstrings to all public methods
  • Maintain test coverage > 80%
Khaled
Khaled ABOUT THE AUTHOR :
My name is Khaled and I studied chemistry at the University of science in Oran-Algeria I have got a master's degree in Biomolecule engineering. I believe in the philosophy of progression over perfection and that fitness is a lifelong journey with new milestones and achievements along the way. After cultivating a healthier lifestyle and developing a commitment to improving through my own fitness journey i discovered my desire to help others with what method works best for me and gave me the best results. That’s why I made this blog. So if you want to take your workouts and your passion to the next level, you’re in the right place.
When I'm not busy with sports, I fill my downtime spending time coding and building blocks of a website (design front-end developer), hanging with family & friends, spearfishing and cooking healthy food.
Progressive Fitness is a compilation of my workouts and nutrition advice, packaged just for you!

Post a Comment