2.6.4.3. pycsamt.emtf.xml.serializer#
EMTF scientific objects -> deterministic XML element trees.
The serializer is intentionally separate from filesystem I/O. It translates
format-neutral pycsamt.emtf.EMTF objects into the EMTF XML vocabulary
without routing through EDI or exposing ElementTree nodes to the scientific
model.
Classes
|
Build a deterministic EMTF XML element tree from an |
Exceptions
Raised when an EMTF object cannot be serialized safely. |
|
Warning emitted when permissive XML writing omits unsafe content. |
- exception pycsamt.emtf.xml.serializer.EMTFXMLSerializationError[source]
Bases:
ValueErrorRaised when an EMTF object cannot be serialized safely.
- exception pycsamt.emtf.xml.serializer.EMTFXMLWriteWarning[source]
Bases:
UserWarningWarning emitted when permissive XML writing omits unsafe content.
- class pycsamt.emtf.xml.serializer.EMTFXMLSerializer(*, strict=True, precision=17)[source]
Bases:
PyCSAMTObjectBuild a deterministic EMTF XML element tree from an
EMTF.- Parameters:
strict (bool, default=True) – Reject unsupported or scientifically ambiguous content. Permissive mode warns and omits only the problematic component.
precision (int, default=17) – Significant decimal digits used for floating-point response data. Seventeen digits are sufficient to round-trip IEEE float64 values.