Skip to main content

OpenTimsTDF

CI DOI crates.io PyPI docs.rs License: Apache-2.0 Rust MSRV

Part of the OpenMassSpec stack for mass spectrometry raw-file access.

Rust and Python reader for timsTOF .d/ (TDF) acquisition bundles - the SQLite analysis.tdf metadata file and the analysis.tdf_bin binary frame stream. Runs on Linux, macOS, and Windows.

Documentation: sigilweaver.app/opentimstdf/docs

Install

Prefer openmassspec-io with the bruker feature/extra unless you need this parser standalone (minimal dependencies, or building your own abstraction) - the umbrella gives you format auto-detection, mzML conversion, and Arrow streaming across all wired-in vendors for free:

cargo add openmassspec-io --features bruker
pip install openmassspec[bruker]

Standalone:

Rust:

cargo add opentimstdf

Python:

pip install opentimstdf

Quickstart

Rust:

use opentimstdf::Reader;

let reader = Reader::open("my_bundle.d")?;
let calib = reader.calibration()?;
let frame = reader.frame(1)?;
for peak in reader.decode_peaks(&frame)? {
    let mz = calib.tof_to_mz(peak.tof);
    let im = calib.scan_to_inv_mobility(peak.scan);
    println!("scan={} mz={:.4} 1/K0={:.4} i={}", peak.scan, mz, im, peak.intensity);
}

Python:

import opentimstdf

reader = opentimstdf.Reader("my_bundle.d")
calib = reader.calibration()
frame = reader.frame(1)
for peak in reader.decode_peaks(frame):
    mz = calib.tof_to_mz(peak.tof)
    print(peak.scan, mz, peak.intensity)

See the docs site for the full quickstart, guide, and format specification.

Known issues and gaps

  • m/z accuracy is limited to the bundle's stored calibration. m/z is computed from the bundle's MzCalibration table. On the public test corpus (9 bundles), calibrant and siloxane ions read about 1.9 ppm from their true m/z (median), 10.4 ppm at the 95th percentile and 16 ppm at most; on some bundles the error grows toward high m/z. Against the precursor m/z values the acquisition software stored in each bundle the median is about 0.8 ppm, which shows the decoder reproduces the instrument's own calibration, not that the calibration is accurate. No temperature correction is applied. For accurate-mass work below about 5 ppm, recalibrate against known masses.
  • Bundles without a usable MzCalibration table (for example ModelType = 2) use a range-based fallback model. On PXD035173, the one such bundle in the corpus, it reads 14 to 31 ppm off; applied to bundles that do have tables, its median error ranged from 2 to about 200 ppm. Reader::mz_calibration_status() and the opentimstdf.mz_calibration run metadata key report which model was used. See the calibration notes.
  • Missing frame data is an error. A frame whose block in analysis.tdf_bin is missing, truncated or does not hold the peaks Frames lists is an Err item when iterating spectra, and write_mzml stops at the first one. A bundle with an empty analysis.tdf_bin (an incomplete upload) fails on its first frame.
  • PRM-PASEF frames are not converted to spectra. MsMsType = 10 frames are skipped by iter_spectra and mzML; they feed only the SRM chromatograms. The corpus has PRM-PASEF metadata but no frame data.
  • Only TDF bundles are read. TSF bundles (TIMS off, MALDI) and BAF bundles are not supported.
  • Tested data: timsTOF Pro, Pro 2 and SCP, DDA-PASEF and diaPASEF, acquired 2019 to 2022, positive mode only. timsTOF HT and Ultra, data from 2023 onward (newer acquisition software), negative mode and MALDI acquisitions are untested. CI runs against one DDA-PASEF bundle (PXD036417); diaPASEF, codec 1 and the range-fallback model are tested only against the local corpus.

License

Apache-2.0. See LICENSE.

The TDF format was worked out from public sample data (PRIDE accessions). See ATTRIBUTION.md. Codec 1 decoding is ported from AlphaTims and the codec 2 decode loop follows OpenTIMS; see THIRD-PARTY-NOTICES.

Metadata

Release files for opentimstdf 3.0.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 opentimstdf 3.0.0
File Size Uploaded
opentimstdf-3.0.0.tar.gz 73.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for opentimstdf 3.0.0
File
opentimstdf-3.0.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
opentimstdf-3.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
opentimstdf-3.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
opentimstdf-3.0.0-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
opentimstdf-3.0.0-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 8.1 MB

Release files / opentimstdf-3.0.0.tar.gz

Download URL opentimstdf-3.0.0.tar.gz
Size 73.8 kB
Tags Source
SHA-256 checksum
How to use checksums
67a1ae94facb175b44c4c2bfba616f05965246ef6457408aec5cdf45027aa520
BLAKE2b-256 checksum
How to use checksums
9b5410c3484f0283195077ef0b6372c22559f759df263a4576ace61b24e07032
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 Oct 11, 2026.

Transparency log

Release files / opentimstdf-3.0.0-cp38-abi3-win_amd64.whl

Download URL opentimstdf-3.0.0-cp38-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b125e9dfde5406d11cd1a924b428bf0c65f16304cab68fb6b163c5433c7a3aa0
BLAKE2b-256 checksum
How to use checksums
5473457a3705f1c45321ac9c430dbd784bb4de1dd2da62f3e3fcaeae673ea8e3
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 Oct 11, 2026.

Transparency log

Release files / opentimstdf-3.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL opentimstdf-3.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.8 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
33f06e6320efd069dd402e4d1c24ac11bca1d5c68d3476724b5ec903c402acda
BLAKE2b-256 checksum
How to use checksums
fc77eb83e548f31877f322c3cbaff82ee1dea1af7ab158c32fe878c41a6d12e6
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 Oct 11, 2026.

Transparency log

Release files / opentimstdf-3.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL opentimstdf-3.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.6 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b668dc3318bc4b56c4655c4cffdf83831dca5f0eb50dae0887dc5287adaa531a
BLAKE2b-256 checksum
How to use checksums
536c7b65fe2d06d160c281fde2ab054520d1c7239437142d50e479b631072d8f
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 Oct 11, 2026.

Transparency log

Release files / opentimstdf-3.0.0-cp38-abi3-macosx_11_0_arm64.whl

Download URL opentimstdf-3.0.0-cp38-abi3-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
da7db44ac310d35414ffd8a9e3f046d6fce57dea3a2c425b9988d43de44b5dbc
BLAKE2b-256 checksum
How to use checksums
9abbe4156357f6f947511efa8f0cf311591d6bc919b7febb50e093594e9fc781
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 Oct 11, 2026.

Transparency log

Release files / opentimstdf-3.0.0-cp38-abi3-macosx_10_12_x86_64.whl

Download URL opentimstdf-3.0.0-cp38-abi3-macosx_10_12_x86_64.whl
Size 1.6 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a4cb0d6a48e88b5913fc46c5dba4e373c845ac48d4c5784e8c33ebbff160e150
BLAKE2b-256 checksum
How to use checksums
52826eb0fc9571123daf1f7726e0684cd2bcaac0f1ccaefb2b02bb463afccb8d
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 Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.0 This release

6 release files

2.0.0

6 release files

1.3.3

6 release files

1.3.2

6 release files

1.3.1

6 release files

1.3.0

6 release files

1.2.6

6 release files

1.2.5

6 release files

1.2.4

6 release files

1.2.3

6 release files

1.2.0

6 release files

1.1.0

6 release files

1.0.6

6 release files

1.0.5

6 release files

1.0.4

6 release files

1.0.3

6 release files

1.0.1

6 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