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.1

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.1
File Size Uploaded Provenance Actions
opentimstdf-3.0.1.tar.gz 73.3 kB With provenance Details for opentimstdf-3.0.1.tar.gz

Built distributions (wheels)

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

Total release size: 8.2 MB

Release files / opentimstdf-3.0.1.tar.gz

Download URL opentimstdf-3.0.1.tar.gz
Size 73.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d7e8869f5e437bf9a3ff93f99ec862a189f4b88f4afc94a3d4ebae86c7863205
BLAKE2b-256 checksum
How to use checksums
f8f79cb2fbac959a195be91acb9eca3dc089dcc40e823a03a805fe0fdaacd2f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

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

Download URL opentimstdf-3.0.1-cp38-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8087badbf796ab245b8cb5874ea85bbe7980d8296df5e0f9bd9c414a0c256fcc
BLAKE2b-256 checksum
How to use checksums
fdf9405b9af51162a3031d00c3dd3de2a0f036efdcfaf0daf58620afaf111e85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

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

Download URL opentimstdf-3.0.1-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_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
f558e3381579b56845e34f45b41196261787d5ed66f7b6eddded4ed4925db0db
BLAKE2b-256 checksum
How to use checksums
ff0910b8ed820d2e3bdd8c86a7defcda2b69c3ab9b707fb0edbb0bf07cbb77df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

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

Download URL opentimstdf-3.0.1-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.6 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
acb7fd79b6f2c1066bb64df34b53adf7388974d4c5a03cc1539244e24d81b945
BLAKE2b-256 checksum
How to use checksums
6ac72abcb5208cb6f1b9b37398eb999e3d3c32f0987631288b46ddb1cb97d793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

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

Download URL opentimstdf-3.0.1-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
a45557644b3cae30476adc19b69d3ce2707b9695e316c1071967b06916b40eff
BLAKE2b-256 checksum
How to use checksums
c5f323025d339c4dbdcc8d75838e9b6b959ce4bd149b2678e6e79d98ac850bf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

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

Download URL opentimstdf-3.0.1-cp38-abi3-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
90c4c88cfe4acc544292de326b8ac6d0998fe3bbfc1c134c8c3df114a3db4b23
BLAKE2b-256 checksum
How to use checksums
97b02543fe019708bc7329539ca6ef56862a065cb86f1a09a8b69a8ff1513d4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for opentimstdf 3.0.1

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for opentimstdf-3.0.1.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 Nov 18, 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