Skip to main content

metamer

metamer fits stochastic noise models to time series and selects among them using configurable information criteria, after (or jointly with) a user-specified deterministic signal model. It is designed to work on a single time series and on very large collections of them — up to 10^7 series, as produced by a global gridded geophysical dataset where every lat/lon point carries its own series. The scientific payoff is a correctly calibrated uncertainty on fitted signal parameters, especially linear trends; everything else serves that.

Status

Alpha — Phase 1 complete. What ships today is metamer.core: the likelihood spine, end to end. A ProcessSpec goes in; a scored, ranked, per-series result comes out. That covers the state-space representation, the Kalman and compiled likelihood engines, the Matérn ν=1/2 and ν=3/2 and white-noise families, the differentiable objective with an adopted gradient oracle, the information criteria, and the comparability guards that refuse to rank scores which are not on the same footing. 588 tests, mypy --strict.

metamer.bench also ships: the benchmark harness used to pick the evaluation path.

Not yet built: metamer.batch and metamer.cli, described under Planned structure below. There are no [batch] or [cli] extras to install yet.

The API is alpha and may change without a deprecation cycle before 1.0.

Installation

pip install metamer

Python 3.12 or newer. Runtime dependencies are numpy, scipy, numba, and psutil.

To run the test suite you also need the test extra, which adds pytest and celerite2 — the latter is an independent oracle the Matérn ν=1/2 likelihood is checked against:

pip install "metamer[test]"

Where to look

Document What it is
docs/superpowers/specs/2026-08-04-metamer-design.md The design. Module boundaries, the public API surface, the likelihood engines, the zarr output schema, the phased implementation plan, and the testing strategy.
docs/superpowers/plans/2026-08-05-metamer-phase1.md The Phase 1 implementation plan: twenty tasks building the likelihood spine end to end on arrays.
PROGRESS.md Current state, cross-cutting decisions, gotchas, and open questions.
metamer-build-prompt.md The original brief. Superseded by the design document's §2 wherever they conflict.

Background

The direct ancestor is Hughes & Williams (2010), The color of sea level: Importance of spatial variations in spectral shape for assessing the significance of trends, J. Geophys. Res. 115, C10048, doi:10.1029/2010JC006102. That work fitted AR(p) models to weekly gridded altimetry at every ocean grid point, selected the order by BIC, and used the result to compute trend uncertainties — finding that statistical errors in local trends range from under 1× to over 5× what a white-noise assumption gives.

metamer sets out to address four limitations of that methodology: two-stage estimation of signal then noise, AR(p) as a discrete-time stand-in for continuous-time processes, hard per-point model selection, and gap handling by interpolation. The design document sets out the approach in detail.

Planned structure

Three layers, gated by optional dependency extras. Only the first exists today; the other two are design commitments, not shipped code, and their extras do not exist yet.

  • metamer.coreimplemented. numpy/scipy/numba. Arrays in, results out. No file I/O, no xarray, no dask. This is what other projects import, and it must be importable without the rest.
  • metamer.batch (planned, extra [batch]) — xarray/dask orchestration, zarr output, checkpointing, resumability.
  • metamer.cli (planned, extra [cli]) — a config-file-driven runner.

metamer is consumed by synesthesia, which renders the frequency content of gridded time series as colour. The dependency runs one way: synesthesia imports metamer, never the reverse.

Development

Dependencies are managed with pixi. All tooling runs through it:

pixi install
pixi run test
pixi run lint
pixi run typecheck
pixi run pre-commit run --all-files

Python 3.12 or newer.

Releases are tag-driven — see RELEASING.md.

Licence

Apache-2.0. See LICENSE.

Download files

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

Source Distribution

metamer-0.1.0.tar.gz (320.3 kB view details)

Uploaded Source

Built Distribution

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

metamer-0.1.0-py3-none-any.whl (155.3 kB view details)

Uploaded Python 3

File details

Details for the file metamer-0.1.0.tar.gz.

File metadata

  • Download URL: metamer-0.1.0.tar.gz
  • Upload date:
  • Size: 320.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for metamer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ce180944abaf4a5e01a84a5e7aa559a8743bf4cad89ee833149dd413367edf02
MD5 cd6cc2c4a8dda0c120c2eba4ea54c803
BLAKE2b-256 d0d764a78236aaab3b6e40b71457d5ab397e9141d11be8d3f5ff71a919f6fb44

See more details on using hashes here.

Provenance

The following attestation bundles were made for metamer-0.1.0.tar.gz:

Publisher: release.yml on killett/metamer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metamer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: metamer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 155.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for metamer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67bd61d9b0d055933fc6496deaf323d9dde1bd0aeea0586e8ea03c6cdde3e0d5
MD5 0e466cef5468f413099a9c7ce9269c9d
BLAKE2b-256 66334bec11a587785258f7a8769c2ddbac1028fa6d9ae612a18f1eca793b7360

See more details on using hashes here.

Provenance

The following attestation bundles were made for metamer-0.1.0-py3-none-any.whl:

Publisher: release.yml on killett/metamer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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