Skip to main content

pyKilt — Kernel-based Inverse Laplace Transform

pyKilt is a lightweight Python package for recovering fluorescence lifetime distributions using the Maximum Entropy Method (MEM). It supports 1D MEM (single-decay) and 2D / global MEM (τ–τ maps or stacks) with optional IRF reconvolution and annealed regularization.

Quick links

  • Full docs: ./docs/ (installation, tutorials, 1D/2D guides, plotting)
  • Examples: ./docs/examples/ (1d_example.py, 2d_example.py)

Installation

From PyPI:

pip install pyKilt

From source (dev):

git clone <repo>
cd pyKilt
pip install -e .[dev]

Minimal usage

1D (single decay)

import numpy as np
import jax.numpy as jnp
from pyKilt import KiltConfig, run_ilt_1d
from pyKilt.plotting import plot_1d_fit, plot_1d_distribution

time = np.linspace(0, 15, 500)
hist = np.loadtxt("my_decay.txt")
tau = jnp.linspace(0.02, 5, 200)
cfg = KiltConfig(use_irf_convolution=True, optimize_eta=True)
res = run_ilt_1d(time, tau, hist, cfg)

# plot best result
fig, ax = plot_1d_fit(time, hist, res["best"]["fit"])
fig, ax = plot_1d_distribution(tau, res["best"]["A"])

2D (global / τ–τ maps)

from pyKilt import KiltConfig, run_ilt_2d
# time: (n_times,), corr_maps: user-provided maps array, tau: lifetime grid
cfg = KiltConfig(global_fit=True, use_irf_convolution=True, optimize_eta=True)
res2d = run_ilt_2d(time, tau, corr_maps, cfg, A_init=A_init)

Key config options (KiltConfig)

  • tau (lifetime grid)
  • optimize_eta, eta_start, eta_end, eta_rounds — annealing schedule for MEM regularization
  • use_irf_convolution, irf, optimize_irf_shift — enable reconvolution and IRF shift search
  • global_fit / A_init — for 2D/global fitting
  • maxiter, rounds_per_eta, conv_pad, sigma2, baseline — solver tuning

Tips

  • Start with a coarse tau grid and short annealing to find stable settings, then refine.
  • Provide experimental IRF and enable reconvolution + IRF shift for accurate fits.
  • Inspect res["trials"] to monitor annealing progression and res["best"] for final outputs.
  • Use plotting helpers in pyKilt.plotting to visualize fits and τ–τ maps.

Documentation & examples

See the docs folder for detailed step-by-step guides:

  • ./docs/usage/1d.md — 1D workflows and examples
  • ./docs/usage/2d.md — 2D/global workflows, A_init suggestions
  • ./docs/usage/plotting.md — plotting helpers
  • ./docs/examples/ — runnable example scripts

Contributing

Open issues or PRs for bugs, examples, doc improvements or feature requests.

License

MIT License See LICENSE in repository.

Release files for pyKilt 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyKilt 0.5.0
File Size Uploaded
pykilt-0.5.0.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyKilt 0.5.0
File Interpreter ABI Platform
pykilt-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / pykilt-0.5.0.tar.gz

Download URL pykilt-0.5.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5f165d6ab9f62dd5d496856a384a021b93cdc1184a5f9777566fc6115c632047
BLAKE2b-256 checksum
How to use checksums
fd6db56cb46988a54706cecdfdb068d852614b4bb3a9191dafc4f6d6b5f26d16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release files / pykilt-0.5.0-py3-none-any.whl

Download URL pykilt-0.5.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cc4915dda8b7f42cbd740ce93dbb19dad38cc350db0aebcd67932c344bc4bd1
BLAKE2b-256 checksum
How to use checksums
6056ab5f38327604d4ab6e137dd6857ec37c2c118e21ed1d6f1734f01796c878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page