Skip to main content

Reader, converter, and CSV tooling for Campbell Scientific data files

Project description

csiio

Python reader and converter for Campbell Scientific Inc data files.

This package focuses on practical ingestion and conversion workflows for CSI formats (including TOA5, TOACI1, TOB1, TOB3, and CSIXML), with DataFrame-native handling for downstream analysis pipelines.

Citation: If you use csiio in published work and want to cite it, see the citation guidance in How To Cite.

Install

pip install -e .

Core Functionality

  • Read CSI files into pandas DataFrames.
  • Auto-detect file type during reads.
  • Convert between supported CSI formats.
  • Export single CSV outputs or time-window-split CSVs.
  • Use either CLI workflows or Python API workflows.

Documentation

CLI Usage

csiio --help

# Read and print DataFrame summary
csiio read /path/to/file.dat

# Read metadata only
csiio read /path/to/file.dat --metaonly

# Stream CSV to stdout (good for shell pipelines)
csiio read /path/to/file.dat --as-csv

# Convert to another CSI format
csiio convert /path/to/in.dat --output-format TOB3 --output /tmp/TOB3_out.dat

# Export CSV and split by time window
csiio to-csv /path/to/in.dat --output /tmp/out.csv --split-window 1H

Python API Usage

from csiio import CSIDataFile, read_csi_files, convert_csi_file

# High-level object workflow
reader = CSIDataFile(["a.dat", "b.dat"])
df = reader.read()
csv_files = reader.to_csv("/tmp/out.csv", split_window="1D")

# Functional workflow
df2, meta = read_csi_files("/path/to/file.dat")
converted = convert_csi_file("/path/to/in.dat", "/tmp/TOA5_out.dat", "TOA5")

How To Cite

If csiio supports published work, and you have the opportunity to cite it you may cite the software repository and version you used.

Suggested BibTeX entry:

@software{csiio,
	title = {csiio: Reader and Converter for Campbell Scientific Data Files},
	author = {Spirig, Robert},
	year = {2026},
	url = {https://github.com/spirrobe/csiio},
	version = {0.1.0}
}

If relevant/available for your workflow, include a commit hash or release tag for exact reproducibility.

Conversion Audit Reports

Generate dual-status conversion audits (strict plus tolerance) with reason codes:

python tests/generate_conversion_audit.py

Outputs are written to:

  • tests/reports/conversion_audit_dual.csv
  • tests/reports/conversion_audit_dual_summary.csv

Project details


Download files

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

Source Distribution

csiio_py-0.1.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

csiio_py-0.1.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: csiio_py-0.1.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for csiio_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4e1eb705389ee1fd363cfc4571a40c2f69a079921140e69b17fee4bb6a16302f
MD5 99cdd232676256e99c93a61f2b4a02e9
BLAKE2b-256 b1869f06b8552ae3915ffa1db77fbe3b941430eb63d90a6ba3667d5f2b7899ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: csiio_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for csiio_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2786e46c82206f9018fccdd049c176890c86fcb3353f7117879c37f8d24d0dc7
MD5 ea10f5553dc08808327b9a3eb7f7bee6
BLAKE2b-256 5a73f2a97b588db09adef098f3f8ee7d887408dbe7b5481f5841aba50cb9b031

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page