Skip to main content

tob2toa

A Python utility to convert Campbell Scientific TOB3 binary data files to TOA5 ASCII format.

This tool aims to replicate the functionality of Campbell Scientific's CardConvert utility, allowing for easy conversion of binary data files on non-Windows systems or as part of automated data processing pipelines.

Features

  • Supports TOB3 binary format.
  • Automatically handles various Campbell Scientific data types:
    • IEEE4, IEEE4B, FP4, IEEE8, IEEE8B
    • INT2, UINT2, INT4, UINT4
    • BOOL, BOOL1, BOOL2, BOOL4
    • ASCII(N)
  • Correctly handles timestamps and record numbers.
  • Supports batch conversion of multiple files.
  • Command-line interface and Python API.

Installation

You can install tob2toa from source:

git clone https://github.com/paultgriffiths/tob2toa.git
cd tob2toa
pip install .

For development:

pip install -e ".[dev]"

Usage

Command Line

Convert a single file:

python -m tob2toa.tob2toa input_file.dat

Convert a single file with a specific output name:

python -m tob2toa.tob2toa input_file.dat output_file.dat

Batch convert all .dat files in a directory:

python -m tob2toa.tob2toa *.dat

Python API

from tob2toa.tob2toa import convert_tob3_to_toa5

# Convert a file
output_path = convert_tob3_to_toa5("path/to/input.dat")
print(f"Converted file saved to: {output_path}")

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for tob2toa 0.4.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 tob2toa 0.4.0
File Size Uploaded
tob2toa-0.4.0.tar.gz 13.8 kB Details

Built distribution (wheel)

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

Total release size: 24.4 kB

Release files / tob2toa-0.4.0.tar.gz

Download URL tob2toa-0.4.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
de39453cd6a94b42ad6daa2ea9b03ba0cdd86b2ddfc98386751f20c3df6ad96e
BLAKE2b-256 checksum
How to use checksums
b7f4063137d4e4b88b22a1bb6d9876b916bbe048dbf0cdd5302b1081596b51f3
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 7, 2026.

Transparency log

Release files / tob2toa-0.4.0-py3-none-any.whl

Download URL tob2toa-0.4.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa7526992aa01f24b4dfcd2762d85cd4085c875f0be9bd0a46855b6282a355c7
BLAKE2b-256 checksum
How to use checksums
55e3ac18c302b058b8819b010587154c057d4387981a043dece0bc9fc4dcc67c
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 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