Skip to main content

taffmat

PyPI Version Python Versions CI Status Coverage Status License Badge

A Python 3.12+ module for reading and writing Teac TAFFmat files.

About the TAFFmat file format

TAFFmat is Teac's proprietary file format used to store data from their LX series and other data recorders.

According to the Teac "LX Series Recording Unit Instruction Manual":

TAFFmat (an acronym for Teac Data Acquisition File Format) is a file format composed of the following:

  • a data file containing A/D (analog to digital) converted data. The file is binary format with the extension dat.
  • a header file containing information such as recording conditions. The file is in text format with the extension hdr.

TAFFmat is a trademark of Teac Corporation.

Data Recorders Using TAFFmat

The following data recorders store their data in the TAFFmat file format:

Installation

You can install taffmat either via the Python Package Index (PyPI) or from source.

To add it to a project managed with uv, which records it in your pyproject.toml and lock file:

$ uv add taffmat

Or to install it with pip:

$ pip install taffmat

Source: https://github.com/questrail/taffmat

Requirements

taffmat requires the following Python packages:

Public API

The following functions are provided:

  • change_slope(data_array, series, gain)
  • read_taffmat(input_file)
  • write_taffmat(data_array, header_data, output_base_filename)
  • write_taffmat_slice(data_array, header_data, output_base_filename, starting_data_index, ending_data_index

Contributing

Contributions are welcome! To contribute please:

  1. Fork the repository
  2. Create a feature branch
  3. Add code and tests
  4. Pass lint and tests
  5. Submit a pull request

Development Setup

The project is managed with uv, and the development tasks are just recipes.

$ brew install uv just

uv sync creates the virtualenv and installs the dependencies, including the development group, and just on its own lists the available recipes.

$ uv sync
$ just

The most common recipes are:

$ just test    # Run the tests using pytest
$ just lint    # Check lint, formatting, types, and workflows
$ just fix     # Lint and format the code using ruff, applying fixes
$ just cov     # Run the tests and report coverage
$ just add X   # Add X as a dependency
$ just out     # List the outdated dependencies

ruff and pyright are deliberately absent from that brew install line. Both are dev dependencies pinned in uv.lock and reached through uv run, so every recipe and every CI job uses the same version. A brew install ruff would put a second, unpinned copy on the path for an editor to find, and ruff releases change how code is formatted: the editor would then reformat code that ruff format --check rejects on the next run.

Releasing to PyPI

just release cuts the release. It first checks that a release is possible at all, then lints, type checks, and tests, then shows the entries waiting under Unreleased and the version each kind of bump would produce, and asks which to cut. Once answered it bumps the version, closes out the CHANGELOG, updates the lock file, commits, and tags. Pushing the tag is what publishes.

$ just release
...
Which release? [1] 1

Tagged v1.0.2. Publish it with:

    git push --follow-tags

The tag push runs the release workflow, which waits on the whole CI workflow before it does anything else: the 3.12, 3.13, and 3.14 matrix and the dependency floor job. It then checks that the tagged commit is on master, since a tag is only a pointer and one placed anywhere else would otherwise publish whatever it points at, rechecks the tag against the version in pyproject.toml, and builds.

Every check to that point runs against the source tree, so the workflow then installs the wheel it just built somewhere src/ is not on the path and exercises it there, which is the only step that can catch a packaging mistake. It uploads once that passes. There is no PyPI API token anywhere: the workflow authenticates with trusted publishing, which mints a short lived credential from the GitHub OIDC identity of that run. That same identity signs a PEP 740 attestation for each distribution, which PyPI serves beside the file it attests.

Uploading is followed by a GitHub release for the tag, carrying the CHANGELOG section for that version as its notes and the built distributions as its assets.

Pushing the tag is the point of no return, since PyPI never lets a version number be reused. Everything just release does is local and amendable until then, and it refuses to start against a dirty working tree, off master, on a master behind its upstream, with a CHANGELOG whose Unreleased section is empty, or when the tag it would create already exists. just release-check runs those refusals on their own.

just build runs the same checks and produces the same distributions without releasing anything, which is the way to inspect what CI would upload.

This depends on one piece of configuration that lives outside the repository. A trusted publisher has to be registered for taffmat on PyPI, pointing at the questrail/taffmat repository, the release.yml workflow, and the pypi environment. It is a one time setup per project.

License

taffmat is released under the MIT license. Please see the LICENSE.txt file for more information.

Release files for taffmat 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 taffmat 3.0.1
File Size Uploaded
taffmat-3.0.1.tar.gz 7.6 MB Details

Built distribution (wheel)

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

Total release size: 7.6 MB

Release files / taffmat-3.0.1.tar.gz

Download URL taffmat-3.0.1.tar.gz
Size 7.6 MB
Tags Source
SHA-256 checksum
How to use checksums
99a1a6d89dd2cebf5c6b3047186f3be48cca99874aa8c4c1e2b8ef9327225315
BLAKE2b-256 checksum
How to use checksums
d9ab0d8417a77eace3b73810e7b8a7b39f8ab3f17806277272f4cbc2cb0f0d3b
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 21, 2026.

Transparency log

Release files / taffmat-3.0.1-py3-none-any.whl

Download URL taffmat-3.0.1-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb52c574724c86a0cd8360327f42140cb4d7832443cc23d74ddb79589672b877
BLAKE2b-256 checksum
How to use checksums
c2359a7c399d0d0a211a786216e30350625db952a2db04d1c1fc632395b5ae1a
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 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.0.1

1 release file

1.0.0

1 release file

0.4.0

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.6

1 release file

0.2

1 release file

0.1.2

1 release file

0.1.1

1 release file

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