Skip to content

Data Schema

data_schema(...) declares fields for structured readout results.

It is used when a readout has a custom or open result shape. It supports readout operations; it is not a workflow operation by itself.

Declare a Schema

text
let gel_schema = data_schema(label = "GelImage", fields = [band_count, signal]);

Arguments:

ArgumentRequiredMeaning
labelyesHuman-readable structure name.
fieldsyesList of field names allowed in the result.

Use schema_ref

Readout calls use schema_ref to attach the declared result structure.

text
let obs = img(sample = lane, quantity = customized, schema_ref = gel_schema);

schema_ref is required when quantity = customized.

It can also be used for supported complex result cases such as physical current readout.

text
let ms_schema = data_schema(label = "MSCurrent", fields = [current_pulse, arrival_time]);
let obs = phy(sample = detector, quantity = current, schema_ref = ms_schema);

Why Declare First

The result shape is declared before use. That keeps later references explicit:

text
obs.result.current_pulse
obs.result.arrival_time

The schema describes structured result fields. It is not a container, material, or execution step by itself.

Released under the Apache-2.0 license.