event_model
#
Members
Document to reference a quanta of externally-stored data |
|
Page of documents to reference a quanta of externally-stored data |
|
Document to record a quanta of collected data |
|
|
|
|
|
Describes the objects in the data property of Event documents |
|
Document to describe the data captured in the associated event documents |
|
Epics limits: see 3.4.1 https://epics.anl.gov/base/R3-14/12-docs/AppDevGuide/node4.html |
|
|
|
The 'interesting' data keys for this device. |
|
Page of documents to record a quanta of collected data |
|
|
|
|
|
Document to reference a collection (e.g. file or group of files) of externally-stored data. |
|
|
|
Start-level hints |
|
|
|
|
|
|
|
|
|
Describe how to interperet this run as the given projection |
|
Document created at the start of run. |
|
Document for the end of a run indicating the success/fail state of the run and the end time |
|
Document to reference a quanta of an externally-stored stream of data. |
|
The parameters required to describe a sequence of incrementing integers |
|
Document to reference a collection (e.g. file or group of files) of externally-stored data streams. |
|
|
|
Compose a RunStart document and factory functions for related documents. |
- class event_model.Datum[source]#
Document to reference a quanta of externally-stored data
- datum_id: str#
Globally unique identifier for this Datum (akin to ‘uid’ for other Document types), typically formatted as ‘<resource>/<integer>’
- datum_kwargs: Dict[str, Any]#
Arguments to pass to the Handler to retrieve one quanta of data
- resource: str#
The UID of the Resource to which this Datum belongs
- class event_model.DatumPage[source]#
Page of documents to reference a quanta of externally-stored data
- datum_id: List[str]#
Array unique identifiers for each Datum (akin to ‘uid’ for other Document types), typically formatted as ‘<resource>/<integer>’
- datum_kwargs: Dict[str, List]#
Array of arguments to pass to the Handler to retrieve one quanta of data
- resource: str#
The UID of the Resource to which all Datums in the page belong
- class event_model.Event[source]#
Document to record a quanta of collected data
- descriptor: str#
UID of the EventDescriptor to which this Event belongs
- seq_num: int#
Sequence number to identify the location of this Event in the Event stream
- uid: str#
Globally unique identifier for this Event
- class event_model.DataKey[source]#
Describes the objects in the data property of Event documents
- choices: NotRequired[List[str]]#
Choices of enum value.
- dims: NotRequired[List[str]]#
The names for dimensions of the data. Null or empty list if scalar data
- dtype: Literal['string', 'number', 'array', 'boolean', 'integer']#
The type of the data in the event, given as a broad JSON schema type.
- dtype_numpy: NotRequired[str | List[List]]#
The type of the data in the event, given as a numpy dtype string (or, for structured dtypes, array).
- external: NotRequired[str]#
Where the data is stored if it is stored external to the events
- object_name: NotRequired[str]#
The name of the object this key was pulled from.
- precision: NotRequired[int | None]#
Number of digits after decimal place if a floating point number
- shape: List[int]#
The shape of the data. Empty list indicates scalar data.
- source: str#
The source (ex piece of hardware) of the data.
- units: NotRequired[str | None]#
Engineering units of the value
- class event_model.EventDescriptor[source]#
Document to describe the data captured in the associated event documents
- configuration: NotRequired[Dict[str, Configuration]]#
Readings of configurational fields necessary for interpreting data in the Events.
- name: NotRequired[str]#
A human-friendly name for this data stream, such as ‘primary’ or ‘baseline’.
- object_keys: NotRequired[Dict[str, Any]]#
Maps a Device/Signal name to the names of the entries it produces in data_keys.
- run_start: str#
Globally unique ID of this run’s ‘start’ document.
- time: float#
Creation time of the document as unix epoch time.
- uid: str#
Globally unique ID for this event descriptor.
- class event_model.Limits[source]#
Epics limits: see 3.4.1 https://epics.anl.gov/base/R3-14/12-docs/AppDevGuide/node4.html
- alarm: NotRequired[LimitsRange | None]#
Alarm limits.
- control: NotRequired[LimitsRange | None]#
Control limits.
- display: NotRequired[LimitsRange | None]#
Display limits.
- hysteresis: NotRequired[float | None]#
Hysteresis.
- rds: NotRequired[RdsRange | None]#
RDS parameters.
- warning: NotRequired[LimitsRange | None]#
Warning limits.
- class event_model.PerObjectHint[source]#
The ‘interesting’ data keys for this device.
- NX_class: NotRequired[str]#
The NeXus class definition for this device.
- fields: NotRequired[List[str]]#
The ‘interesting’ data keys for this device.
- class event_model.EventPage[source]#
Page of documents to record a quanta of collected data
- descriptor: str#
The UID of the EventDescriptor to which all of the Events in this page belong
- seq_num: List[int]#
Array of sequence numbers to identify the location of each Event in the Event stream
- uid: List[str]#
Array of globally unique identifiers for each Event
- class event_model.Resource[source]#
Document to reference a collection (e.g. file or group of files) of externally-stored data
- path_semantics: NotRequired[Literal['posix', 'windows']]#
Rules for joining paths
- run_start: NotRequired[str]#
Globally unique ID to the run_start document this resource is associated with.
- class event_model.Hints[source]#
Start-level hints
- dimensions: NotRequired[List[List[List[str] | str]]]#
The independent axes of the experiment. Ordered slow to fast
- class event_model.Projections[source]#
Describe how to interperet this run as the given projection
- configuration: Dict[str, Any]#
Static information about projection
- name: NotRequired[str]#
The name of the projection
- version: str#
The version of the projection spec. Can specify the version of an external specification.
- class event_model.RunStart[source]#
Document created at the start of run. Provides a seach target and later documents link to it
- data_groups: NotRequired[List[str]]#
An optional list of data access groups that have meaning to some external system. Examples might include facility, beamline, end stations, proposal, safety form.
- data_session: NotRequired[str]#
An optional field for grouping runs. The meaning is not mandated, but this is a data management grouping and not a scientific grouping. It is intended to group runs in a visit or set of trials.
- group: NotRequired[str]#
Unix group to associate this data with
- owner: NotRequired[str]#
Unix owner to associate this data with
- project: NotRequired[str]#
Name of project that this run is part of
- sample: NotRequired[Dict[str, Any] | str]#
Information about the sample, may be a UID to another collection
- scan_id: NotRequired[int]#
Scan ID number, not globally unique
- time: float#
Time the run started. Unix epoch time
- uid: str#
Globally unique ID for this run
- class event_model.RunStop[source]#
Document for the end of a run indicating the success/fail state of the run and the end time
- data_type: NotRequired[Any]#
data_type
- exit_status: Literal['success', 'abort', 'fail']#
State of the run when it ended
- num_events: NotRequired[Dict[str, int]]#
Number of Events per named stream
- reason: NotRequired[str]#
Long-form description of why the run ended
- run_start: str#
Reference back to the run_start document that this document is paired with.
- time: float#
The time the run ended. Unix epoch
- uid: str#
Globally unique ID for this document
- class event_model.StreamDatum[source]#
Document to reference a quanta of an externally-stored stream of data.
- descriptor: str#
UID of the EventDescriptor to which this Datum belongs
- indices: StreamRange#
A slice object passed to the StreamResource handler so it can hand back data and timestamps
- seq_nums: StreamRange#
A slice object showing the Event numbers the resource corresponds to
- stream_resource: str#
The UID of the Stream Resource to which this Datum belongs.
- uid: str#
Globally unique identifier for this Datum. A suggested formatting being ‘<stream_resource>/<stream_name>/<block_id>
- class event_model.StreamRange[source]#
The parameters required to describe a sequence of incrementing integers
- start: int#
First number in the range
- stop: int#
Last number in the range is less than this number
- class event_model.StreamResource[source]#
Document to reference a collection (e.g. file or group of files) of externally-stored data streams
- data_key: str#
A string to show which data_key of the Descriptor are being streamed
- mimetype: str#
String identifying the format/type of this Stream Resource, used to identify a compatible Handler
- parameters: Dict[str, Any]#
Additional keyword arguments to pass to the Handler to read a Stream Resource
- run_start: NotRequired[str]#
Globally unique ID to the run_start document this Stream Resource is associated with.
- uid: str#
Globally unique identifier for this Stream Resource
- uri: str#
URI for locating this resource
- event_model.compose_run(*, uid: str | None = None, time: float | None = None, metadata: Dict | None = None, validate: bool = True, event_counters: Dict[str, int] | None = None) ComposeRunBundle [source]#
Compose a RunStart document and factory functions for related documents.
- Parameters:
uid (string, optional) – Unique identifier for this run, conventionally a UUID4. If None is given, a UUID4 will be generated.
time (float, optional) – UNIX epoch time of start of this run. If None is given, the current time will be used.
metadata (dict, optional) – Additional metadata include the document
validate (boolean, optional) – Validate this document conforms to the schema.
event_counters (dict, optional) – A dict for counting events, when an event is composed by any of the descriptors composed by this run, the element in this dict with the key of the descriptor name will be increased by 1.
- Return type:
ComposeRunBundle