scippneutron.metadata.Measurement#
- class scippneutron.metadata.Measurement(**data)[source]#
A single measurement.
Terminology:
An “experiment” is the collection of all related measurements, typically done during one beamtime.
A “measurement” is a single step of data collection. It typically corresponds to a single NeXus file or a single entry in a NeXus file.
The
Measurement
class represents a single measurement but also includes some information about the experiment that this measurement is part of. In particular,experiment_id
andexperiment_doi
encode information about the experiment. All other fields encode information about a measurement; this includesstart_time
andend_time
.Attributes
model_computed_fields
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extra
Get extra fields set during validation.
model_fields
model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Return the run number as an int if possible.
The title of the measurement.
Run number of the measurement.
An ID for the experiment that this measurement is part of, e.g., proposal ID.
A DOI for the experiment that this measurement is part of.
Date and time when the measurement started.
Date and time when the measurement ended.
- end_time: datetime | None#
Date and time when the measurement ended.
- experiment_doi: Annotated[str | None, BeforeValidator(_unpack_variable)]#
A DOI for the experiment that this measurement is part of.
- experiment_id: Annotated[str | None, BeforeValidator(_unpack_variable)]#
An ID for the experiment that this measurement is part of, e.g., proposal ID.
- classmethod from_nexus_entry(entry)[source]#
Construct a Measurement object from a Nexus entry.
- Parameters:
entry (
Group
) – ScippNexus group for a NeXus entry.- Returns:
Measurement
– An Measurement object constructed from the given Nexus entry.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- run_number: Annotated[str | None, BeforeValidator(_unpack_variable)]#
Run number of the measurement.
- start_time: datetime | None#
Date and time when the measurement started.
- title: Annotated[str | None, BeforeValidator(_unpack_variable)]#
The title of the measurement.