Metadata-Version: 2.4
Name: csemx
Version: 0.2.0
Summary: Read, write, and validate csemx bundles - an open exchange format for frequency-domain CSEM data
Author-email: Kerry Key <kkey@deepbluegeophysics.com>, Alexander James <alexkjames@deepbluegeophysics.com>
Maintainer-email: Deep Blue Geophysics <csemx@deepbluegeophysics.com>
License: MIT
Project-URL: Homepage, https://deep-blue-geophysics.github.io/csemx/
Project-URL: Specification, https://deep-blue-geophysics.github.io/csemx/csemx-specification.html
Project-URL: Repository, https://github.com/Deep-Blue-Geophysics/csemx
Project-URL: Issues, https://github.com/Deep-Blue-Geophysics/csemx/issues
Project-URL: Changelog, https://github.com/Deep-Blue-Geophysics/csemx/blob/main/CHANGELOG.md
Keywords: CSEM,controlled-source electromagnetics,geophysics,electromagnetics,data format,validation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: File Formats
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: full
Requires-Dist: PyYAML>=6.0; extra == "full"
Requires-Dist: jsonschema>=4.0.1; extra == "full"
Requires-Dist: pyproj>=3.3.1; extra == "full"
Requires-Dist: pyarrow>=9.0.0; extra == "full"
Dynamic: license-file

# csemx — Python client

Reference reader, writer, and validator for
[csemx](https://github.com/Deep-Blue-Geophysics/csemx) bundles — an open,
vendor-neutral exchange format for modeling-ready frequency-domain
controlled-source electromagnetic (CSEM) data
([specification](https://deep-blue-geophysics.github.io/csemx/csemx-specification.html)).

The core (`read`/`write` and the dependency-light checks) needs **no
third-party packages**; the optional `full` extra adds the libraries required
for complete conformance validation.

> **Beta.** The package version tracks the format version it implements:
> `csemx` 0.1.x reads and validates format 0.1 bundles exactly. During the
> 0.x beta, format minor versions may include breaking changes and the
> validator accepts only its own format version (spec §12).

## Contents

- `src/csemx/io.py` — `read()` / `write()` and the `CsemxBundle` / `Table` types
- `src/csemx/validation.py` — `validate()` and the bundle/manifest checks
- `src/csemx/cli.py` — the `csemx` command-line entry point
- `src/csemx/schemas/` — bundled manifest schema and validator metadata
- `tests/` — validator regression tests

## Install

```bash
python3 -m pip install csemx            # core: read/write + light checks
python3 -m pip install "csemx[full]"    # + PyYAML, jsonschema, pyproj, pyarrow
```

From a repository checkout, editable:

```bash
python3 -m pip install -e "./python"
python3 -m pip install -e "./python[full]"
```

The `full` extra enables manifest JSON-Schema validation, EPSG/CRS checks, and
Parquet tables. Requires Python ≥ 3.9.

## Command line

```bash
csemx validate examples/example.csemx              # dependency-light checks
csemx validate --full examples/example.csemx.zip   # full conformance
csemx inspect examples/example.csemx               # summarize a bundle
```

## Library

```python
import csemx

bundle = csemx.read("examples/example.csemx")          # -> CsemxBundle
errors, warnings = csemx.validate("examples/example.csemx", full=True)
csemx.write(bundle, "out.csemx.zip")                   # directory or .zip
```

Public API: `read`, `write`, `validate`, and the `CsemxBundle`, `Table`, and
`ValidationError` types.

## Tests

```bash
python3 -m unittest python.tests.test_validate   # from the repository root
```
