File formats and codecs#

This section is for reader and writer implementers. To save a Python acquisition, use Save and share your data; no codec selection is needed.

QEM: portable measurements and metadata#

Read the specification in this order:

Question

Authoritative page

What does the file contain, and what must round-trip?

Container and scientific metadata

How are integer counts and float bits encoded?

Codec layouts

Which vendor fields are interpreted or retained?

Metadata mapping

How do independent readers prove correctness?

Conformance and interoperability

How does a qualified DM4 acquisition map to QEM?

DM4 conversion details

Container, metadata-schema, and codec versions identify different parts of the file contract. Follow the identifiers declared in the file; a newer prose specification does not imply that every backend supports every layout.

Runtime storage and prepared formats#

A device’s resident representation and a portable acquisition file serve different purposes. Python acquisition loading uses ANS; internal layouts and prepared formats have their own callers and acceptance boundaries.

Implementation task

Contract

Understand encoded, paired, and dense layouts

Count representations

Implement the Swift/Metal prepared packed-file layout

Lossless Pack Format v1

Produce that format from a native application

Native producer

Maintain the internal count-ANS container

Count-ANS

Maintain paired resident counts

Paired-count layout

The prepared packed format is read only by the native Swift/Metal loader; io.load does not open it. Use the original measurements to export a supported QEM file. Dated codec experiments remain in Historical records.