You're reading the documentation for a development version. For the latest released version, please have a look at v0.1.
evefile.entities.metadata module
Metadata classes corresponding to the data entities.
Data without context (i.e. metadata) are mostly useless. Hence, to every
class (type) of data in the evefile.entities.data module,
there exists a corresponding metadata class in this module.
Overview
A first overview of the classes implemented in this module and their hierarchy is given in the UML diagram below.
Fig. 13 Class hierarchy of the evefile.entities.metadata module.
Each concrete class in the evefile.entities.data module
has a corresponding metadata class in this module.
You may click on the image for a larger view.
A note on the AbstractDeviceMetadata interface class: The eveH5
dataset corresponding to the TimestampMetadata class is special in
sense of having no PV and transport type nor an id. Several options have been
considered to address this problem:
Moving these three attributes down the line and copying them multiple times (feels bad).
Leaving the attributes blank for the “special” dataset (feels bad, too).
Introduce another class in the hierarchy, breaking the parallel to the Data class hierarchy (potentially confusing).
Create a mixin class (abstract interface) with the three attributes and use multiple inheritance/implements.
As obvious from the UML diagram, the last option has been chosen. The name “DeviceMetadata” clearly distinguishes actual devices from datasets not containing data read from some instrument.
The following is not a strict inheritance hierarchy, but rather a grouped hierarchical list of classes for quick access to their individual API documentation:
Module documentation
- class evefile.entities.metadata.Metadata
Bases:
objectMetadata for the devices involved in a measurement.
This is the base class for all data(sets) and not meant to be used directly. Rather, one of the individual subclasses should actually be used.
This class complements the class
evefile.entities.data.Data.- name
Name of the device.
Devices are uniquely identified by an ID that usually corresponds to the EPICS process variable (PV). However, most devices have “given” names as well that provide a more human-readable alternative.
- Type:
- options
(Scalar) options of the device.
Devices can have options. Generally, there are two types of options: those whose values are not changing within a given scan module, and those whose values can potentially change for every individual position (count). The former are stored here as key–value pairs with the key corresponding to the option name. The latter are stored in the
evefile.entities.data.Data.optionsattribute.- Type:
Examples
The
Metadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.AbstractDeviceMetadata
Bases:
objectMixin class (interface) for metadata of actual physical devices.
Each physical device has a unique ID and can be accessed by an EPICS process variable (PV).
Examples
The
AbstractDeviceMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.
- class evefile.entities.metadata.MonitorMetadata
Bases:
Metadata,AbstractDeviceMetadataMetadata for monitor data.
This class complements the class
evefile.entities.data.MonitorData.Examples
The
MonitorMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.MeasureMetadata
Bases:
MetadataMetadata for data that are actually measured.
This class complements the class
evefile.entities.data.MeasureData.- unit
Name of the unit corresponding to the data.
- Type:
string
Examples
The
MeasureMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.DeviceMetadata
Bases:
MeasureMetadata,AbstractDeviceMetadataMetadata for device data.
This class complements the class
evefile.entities.data.DeviceData.Examples
The
DeviceMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.AxisMetadata
Bases:
MeasureMetadata,AbstractDeviceMetadataMetadata for axis data.
This class complements the class
evefile.entities.data.AxisData.Examples
The
AxisMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.ChannelMetadata
Bases:
MeasureMetadata,AbstractDeviceMetadataMetadata for channel data.
This class complements the class
evefile.entities.data.ChannelData.Examples
The
ChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.TimestampMetadata
Bases:
MeasureMetadataMetadata for the special dataset mapping timestamps to positions.
This class complements the class
evefile.entities.data.TimestampData.Examples
The
TimestampMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.SinglePointChannelMetadata
Bases:
ChannelMetadataMetadata for channels with numeric 0D data.
This class complements the class
evefile.entities.data.SinglePointChannelData.Examples
The
SinglePointChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.AverageChannelMetadata
Bases:
ChannelMetadataMetadata for channels with averaged numeric 0D data.
This class complements the class
evefile.entities.data.AverageChannelData.- low_limit
Minimum value for first reading of the channel
If set, the value of the channel is read and needs to be larger than this minimum value to start the comparison phase.
- Type:
- max_deviation
Maximum deviation allowed between two values in the comparison phase.
If the
low_limitis set, as soon as the value of the channel is larger than the low limit, the comparison phase starts. Here, two subsequent channel readouts need to be within the boundary set bymax_deviation.However, no more than
max_attemptschannel readouts are done.- Type:
Examples
The
AverageChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.IntervalChannelMetadata
Bases:
ChannelMetadataMetadata for channels with numeric 0D data measured in a time interval.
This class complements the class
evefile.entities.data.IntervalChannelData.Examples
The
IntervalChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.NormalizedChannelMetadata
Bases:
objectMixin class (interface) for metadata of normalized channel data.
Examples
The
NormalizedChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.
- class evefile.entities.metadata.SinglePointNormalizedChannelMetadata
Bases:
ChannelMetadata,NormalizedChannelMetadataMetadata for channels with normalized numeric 0D data.
This class complements the class
evefile.entities.data.SinglePointNormalizedChannelData.Examples
The
SinglePointNormalizedChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.AverageNormalizedChannelMetadata
Bases:
ChannelMetadata,NormalizedChannelMetadataMetadata for channels with normalized averaged numeric 0D data.
This class complements the class
evefile.entities.data.AverageNormalizedChannelData.Examples
The
AverageNormalizedChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.
- class evefile.entities.metadata.IntervalNormalizedChannelMetadata
Bases:
ChannelMetadata,NormalizedChannelMetadataMetadata for channels with normalized interval-measured numeric 0D data.
This class complements the class
evefile.entities.data.IntervalNormalizedChannelData.Examples
The
IntervalNormalizedChannelMetadataclass is not meant to be used directly, as any entities, but rather indirectly by means of the respective facades in the boundaries technical layer of theevefilepackage. Hence, for the time being, there are no dedicated examples how to use this class. Of course, you can instantiate an object as usual.- copy_attributes_from(source=None)
Obtain attributes from another
Metadataobject.Sometimes, it is useful to obtain the (public) attributes from another
Metadataobject. Note that only public attributes are copied. Furthermore, a (true) copy of the attributes is obtained, hence the properties of source and target are actually different objects.- Parameters:
source (
Metadata) –Object to copy attributes from.
Should typically be of the same (super)type.
- Raises:
ValueError – Raised if no source is provided to copy attributes from.