PyRATE-TA Documentation#

Kinetic Analysis of Time-Resolved Spectroscopy: Multi-Exponential, Global, Target & Lifetime Density Analysis

PyRATE-TA is the companion kinetic-modelling and fitting package to PyMORGAN. While PyMORGAN owns data loading, preprocessing, and publication plotting, PyRATE-TA provides Variable Projection (VARPRO) global and target analysis, rate-matrix (\(\mathbf{K}\)) scheme compilation, Lifetime Density Analysis (LDA), and constrained pure positive species spectrum recovery (GSB / SE de-bleaching).

🚀 Installation & Setup

Install via pip / uv, co-develop with PyMORGAN, or run via the standalone PyMORGAN Suite launcher.

Installation
🔗 The PyMORGAN Boundary

Understand the clean one-way architecture between pymorgan (data, preprocessing, aesthetics) and pyrate_ta (kinetic models, solvers, uncertainties).

The PyMORGAN Boundary
🧬 Kinetic Models & Rate Matrices

Parallel (DAS), Sequential (EAS), and Target (SAS) models, text-based reaction scheme notation, horizontal compartment diagrams, and analytical EMG IRF convolution.

Kinetic Models & Rate Matrices
⚡ Global, Target & LDA Fitting

Variable projection, coherent-artefact bases, sign-constrained amplitudes, GSB/SE de-bleaching, Tikhonov Lifetime Density Analysis (L-curve / GCV / Morozov), and .prfit session archives, and CSV / 2D surface / .zip exports.

Global, Target & Lifetime Density Analysis (LDA)
🖥️ Graphical Interface & Settings

Explore the PyQt6 fitting interface, interactive K-matrix editor, 3-group LDA tab, and unified settings.toml configuration.

Graphical Interface & Settings
📚 Full Python API Reference

Auto-generated API documentation for pyrate_ta.models, pyrate_ta.fit, pyrate_ta.results, pyrate_ta.plot, pyrate_ta.io, and pyrate_ta.settings.

API Reference

Download Complete LaTeX Manual (PDF)

In addition to this interactive web documentation, the complete typeset manual is compiled from docs/*.tex and available as a standalone PDF: Download PyRATE-TA Manual (main.pdf).

Quick Example#

import pymorgan as pm
import pyrate_ta as pr

# 1. Load & preprocess dataset in PyMORGAN
data = pm.load_1D("scan.pdat", data_type="PDAT")
data.background_correct(tmin=-20, tmax=-5)

# 2. Global sequential fit (EAS) with Gaussian IRF in PyRATE-TA
fit = pr.fit_global(
    data,
    n_components=3,
    model_type="Sequential",
    irf_mode="Gaussian",
    coherent_artifact=True,
)
print(fit.summary())

# 3. Plot Evolution-Associated Spectra (EAS) and concentration profiles
data.plot_species_spectra(*fit.as_species_args())
pr.plot_concentrations(fit)

# 4. Save reproducible fit session (.prfit)
pr.save_fit("scan_sequential_fit", fit)

# 5. Export EAS, C(t), 2D surfaces & summary report (folder or .zip)
fit.export_results("exports/", dataset=data)
fit.export_results("scan_bundle.zip", dataset=data, surface_format="pdat")

Contents#