Skip to main content

LATED

Measure emission lines you can't spectroscopically resolve, straight from photometry.

PyPI version Python versions License: MIT Tests

You have JWST (or Roman) photometry of a galaxy, and one of the bands looks too bright: an emission line is boosting it. lated turns that excess into a number. It fits a simple continuum + emission-line model through the real filter curves and reports the line fluxes, rest-frame equivalent widths and line ratios (for example [O III] 5007 / Hβ) that the photometry implies.

When a line is genuinely there, you get a measurement with uncertainties. When it isn't, you get an honest upper limit, not a fabricated value. That distinction is the whole point of the tool.

Use it two ways: a point-and-click web app (no coding), or a small Python API for scripting and batch work.

The lated web workbench

Install

pip install lated

That is everything: the Python library, the command line, and the web app. Python 3.9+ (depends only on NumPy, SciPy, pydantic and FastAPI).

The web app

lated serve            # open http://127.0.0.1:8321

Pick a redshift, tick the bands you have, paste your fluxes, and press run. You get a verdict card (measurement or limit), an SED figure and a corner plot, all exportable to PDF. Start from one of the built-in literature examples to see the whole workflow in a single click. Everything on the board is editable: the line list, which lines are free / tied / off, the nebular conditions that set the Balmer ratios (Osterbrock & Ferland 2006 Case A/B by temperature and density), the continuum slope, dust, and the error budget.

From Python

from lated import FitConfig, fit

photometry = {"F200W": (0.0136, 0.0019),   # {band: (flux, error)} in microJansky
              "F277W": (0.0249, 0.0016),
              "F356W": (0.0040, 0.0014)}

res = fit(photometry, FitConfig.fixed_slope(z=3.193))
print(res.ratios[0].status)                # 'upper_limit', 'measured', ...

That is the whole idea. The example notebook walks through reading the results, plotting the SED and corner, editing line roles, choosing nebular conditions, and the posterior error budget.

What you get back

Every line ratio carries a status, so a number is never mistaken for a measurement it isn't:

status meaning quote
measured both lines detected the value with 16/50/84 percentiles
upper_limit numerator consistent with zero < p97.5 (2σ)
lower_limit denominator consistent with zero > p2.5
unconstrained no band covers the line nothing usable

Each line also reports the faintest flux your photometry could have detected, so every non-detection comes with its depth.

How it works

Per band, the predicted flux is the photon-weighted mean of

f_λ(λ) = C (λ/λ0)^β  +  Σ_l  F_l · δ(λ − λ_l (1+z))

integrated through the real transmission curve and compared to your photometry with a Gaussian likelihood; amplitudes are solved by error-weighted non-negative least squares over a grid of slopes. Every parameter has an explicit role (free, fixed, or tied) that you can change, and invalid setups (unknown bands, tie cycles, non-positive errors, under-constrained fits) are raised as errors rather than silently ignored.

Command line

lated serve                 # run the web app
lated fit input.json        # fit from a JSON file
lated bands                 # list the bundled filter curves
lated lines                 # show the default line registry

The web app also exposes a small REST API (/api/meta, /api/filters/{name}, /api/fit) with interactive docs at /docs.

Citing

If lated contributes to your research, please cite the LATED methodology paper, Li et al. (2026), arXiv:2609.24588.

Development

git clone https://github.com/lmytime/lated
cd lated
pip install -e ".[test]"
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest tests/ -q

Issues and contributions are welcome at github.com/lmytime/lated. Released under the MIT License.

Metadata

Release files for lated 0.3.3

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

Source distribution (sdist)

Source distribution for lated 0.3.3
File Size Uploaded Provenance Actions
lated-0.3.3.tar.gz 279.3 kB With provenance Details for lated-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lated 0.3.3
File Interpreter ABI Platform Actions
lated-0.3.3-py3-none-any.whl Python 3 none any Details for lated-0.3.3-py3-none-any.whl

Total release size: 479.5 kB

Release files / lated-0.3.3.tar.gz

Download URL lated-0.3.3.tar.gz
Size 279.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dea1598fe94a9db103a851b88de43d712ae4dbd1acce52c577ef92072f0b4909
BLAKE2b-256 checksum
How to use checksums
b24e3a9f7e9265de66da3418893ae86e57b300740689e2f2861014bfbe23ebc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 22, 2026.

Transparency log

Release files / lated-0.3.3-py3-none-any.whl

Download URL lated-0.3.3-py3-none-any.whl
Size 200.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81693feee307a89c756dea2cba1aad9ed72aed1a005071acd4205246316f7c5d
BLAKE2b-256 checksum
How to use checksums
9485f8c0ed7b8f9a51e164751a0f0201a74a9699ae5432871691948d8e54dded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 22, 2026.

Transparency log

Security for lated 0.3.3

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lated-0.3.3.tar.gz

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 Sep 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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