pycsamt.seg.schema#
SEG-EDI schema (keywords, options, ordering).
This module centralizes tags (block keywords), families,
allowed options, and the top-level BNF skeleton for SEG-EDI
files. It is intentionally light-weight and import-safe: there
is no I/O here — just constants and a couple of helpers. Use
it from readers/writers (e.g. pycsamt.seg.edi).
Notes
Keywords and option names are UPPERCASE in the standard. We keep tags exactly as they appear (e.g.
">ZXXR").Sets are
frozensetto make them hashable and safe for reuse in dataclasses and default arguments.The schema aggregates both MT and EMAP blocks, including filtered EMAP forms (
F*) and auxiliary diagnostics.The option tables here are non-exhaustive for some of the highly system-dependent blocks (
>TSERIES, spectra). They list the stable core options we validate against; the reader may accept extras as opaqueKEY=VALUEpairs.
References
SEG MT/EMAP EDI v1.0 (1991) — consolidated into
pycsamt.seg.schema as constants for reuse.
Functions
|
Return canonical upper-case tag with leading '>' preserved. |
|
Return family/category name for tag if known. |