ess.reduce.nexus.types.Measurement#

pydantic model ess.reduce.nexus.types.Measurement[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 and experiment_doi encode information about the experiment. All other fields encode information about a measurement; this includes start_time and end_time.

Show JSON schema
{
   "title": "Measurement",
   "description": "A single measurement.\n\nTerminology:\n\n    - An \"experiment\" is the collection of all related measurements,\n      typically done during one beamtime.\n    - A \"measurement\" is a single step of data collection.\n      It typically corresponds to a single NeXus file or a single entry\n      in a NeXus file.\n\nThe ``Measurement`` class represents a single measurement but also includes some\ninformation about the experiment that this measurement is part of.\nIn particular, ``experiment_id`` and ``experiment_doi`` encode\ninformation about the experiment.\n*All* other fields encode information about a measurement; this includes\n``start_time`` and ``end_time``.",
   "type": "object",
   "properties": {
      "title": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "title": "Title"
      },
      "run_number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Run Number"
      },
      "experiment_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Experiment Id"
      },
      "experiment_doi": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Experiment Doi"
      },
      "start_time": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Start Time"
      },
      "end_time": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "End Time"
      }
   },
   "required": [
      "title"
   ]
}

Fields:
  • end_time (datetime.datetime | None)

  • experiment_doi (str | None)

  • experiment_id (str | None)

  • run_number (str | None)

  • start_time (datetime.datetime | None)

  • title (str | None)

field end_time: datetime | None = None#

Date and time when the measurement ended.

field experiment_doi: Annotated[str | None, BeforeValidator(_unpack_variable)] = None#

A DOI for the experiment that this measurement is part of.

Constraints:
  • func = <function _unpack_variable at 0x7f591ddde480>

  • json_schema_input_type = PydanticUndefined

field experiment_id: Annotated[str | None, BeforeValidator(_unpack_variable)] = None#

An ID for the experiment that this measurement is part of, e.g., proposal ID.

Constraints:
  • func = <function _unpack_variable at 0x7f591ddde480>

  • json_schema_input_type = PydanticUndefined

field run_number: Annotated[str | None, BeforeValidator(_unpack_variable)] = None#

Run number of the measurement.

Constraints:
  • func = <function _unpack_variable at 0x7f591ddde480>

  • json_schema_input_type = PydanticUndefined

field start_time: datetime | None = None#

Date and time when the measurement started.

field title: Annotated[str | None, BeforeValidator(_unpack_variable)] [Required]#

The title of the measurement.

Constraints:
  • func = <function _unpack_variable at 0x7f591ddde480>

  • json_schema_input_type = PydanticUndefined

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.

property run_number_maybe_int: int | str | None#

Return the run number as an int if possible.