evedata.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 evedata.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. 40 Class hierarchy of the evedata.evefile.entities.metadata
module.
Each concrete class in the evedata.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” resembles the hierarchy in the scml.setup
module and
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 evedata.evefile.entities.metadata.Metadata
Bases:
object
Metadata 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
evedata.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
evedata.evefile.entities.data.Data.options
attribute.- Type:
Examples
The
Metadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.AbstractDeviceMetadata
Bases:
object
Mixin 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
AbstractDeviceMetadata
class 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 theevedata.evefile
subpackage. 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 evedata.evefile.entities.metadata.MonitorMetadata
Bases:
Metadata
,AbstractDeviceMetadata
Metadata for monitor data.
This class complements the class
evedata.evefile.entities.data.MonitorData
.Examples
The
MonitorMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.MeasureMetadata
Bases:
Metadata
Metadata for data that are actually measured.
This class complements the class
evedata.evefile.entities.data.MeasureData
.- unit
Name of the unit corresponding to the data.
- Type:
string
Examples
The
MeasureMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.DeviceMetadata
Bases:
MeasureMetadata
,AbstractDeviceMetadata
Metadata for device data.
This class complements the class
evedata.evefile.entities.data.DeviceData
.Examples
The
DeviceMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.AxisMetadata
Bases:
MeasureMetadata
,AbstractDeviceMetadata
Metadata for axis data.
This class complements the class
evedata.evefile.entities.data.AxisData
.Examples
The
AxisMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.ChannelMetadata
Bases:
MeasureMetadata
,AbstractDeviceMetadata
Metadata for channel data.
This class complements the class
evedata.evefile.entities.data.ChannelData
.Examples
The
ChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.TimestampMetadata
Bases:
MeasureMetadata
Metadata for the special dataset mapping timestamps to positions.
This class complements the class
evedata.evefile.entities.data.TimestampData
.Examples
The
TimestampMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.NonnumericChannelMetadata
Bases:
ChannelMetadata
Metadata for channels with non-numeric data.
This class complements the class
evedata.evefile.entities.data.NonnumericChannelData
.Examples
The
NonnumericChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.SinglePointChannelMetadata
Bases:
ChannelMetadata
Metadata for channels with numeric 0D data.
This class complements the class
evedata.evefile.entities.data.SinglePointChannelData
.Examples
The
SinglePointChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.AverageChannelMetadata
Bases:
ChannelMetadata
Metadata for channels with averaged numeric 0D data.
This class complements the class
evedata.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_limit
is 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_attempts
channel readouts are done.- Type:
Examples
The
AverageChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.IntervalChannelMetadata
Bases:
ChannelMetadata
Metadata for channels with numeric 0D data measured in a time interval.
This class complements the class
evedata.evefile.entities.data.IntervalChannelData
.Examples
The
IntervalChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.ArrayChannelMetadata
Bases:
ChannelMetadata
Metadata for channels with numeric 1D data.
This class complements the class
evedata.evefile.entities.data.ArrayChannelData
.Examples
The
ArrayChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.AreaChannelMetadata
Bases:
ChannelMetadata
Metadata for channels with numeric 2D data.
This class complements the class
evedata.evefile.entities.data.AreaChannelData
.Examples
The
AreaChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.NormalizedChannelMetadata
Bases:
object
Mixin class (interface) for metadata of normalized channel data.
Examples
The
NormalizedChannelMetadata
class 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 theevedata.evefile
subpackage. 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 evedata.evefile.entities.metadata.SinglePointNormalizedChannelMetadata
Bases:
ChannelMetadata
,NormalizedChannelMetadata
Metadata for channels with normalized numeric 0D data.
This class complements the class
evedata.evefile.entities.data.SinglePointNormalizedChannelData
.Examples
The
SinglePointNormalizedChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.AverageNormalizedChannelMetadata
Bases:
ChannelMetadata
,NormalizedChannelMetadata
Metadata for channels with normalized averaged numeric 0D data.
This class complements the class
evedata.evefile.entities.data.AverageNormalizedChannelData
.Examples
The
AverageNormalizedChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.IntervalNormalizedChannelMetadata
Bases:
ChannelMetadata
,NormalizedChannelMetadata
Metadata for channels with normalized interval-measured numeric 0D data.
This class complements the class
evedata.evefile.entities.data.IntervalNormalizedChannelData
.Examples
The
IntervalNormalizedChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.ScopeChannelMetadata
Bases:
ArrayChannelMetadata
Metadata for oscilloscope channels.
This class complements the class
evedata.evefile.entities.data.ScopeChannelData
.Examples
The
ScopeChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.MCAChannelMetadata
Bases:
ArrayChannelMetadata
Metadata for multichannel analyzer (MCA) channels.
This class complements the class
evedata.evefile.entities.data.MCAChannelData
.- calibration
Metadata for the calibration of the MCA channel.
- Type:
Examples
The
MCAChannelMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.MCAChannelCalibration
Bases:
object
Metadata for MCA channel calibration.
Many MCA channels need to be calibrated (with a second-order polynomial) to convert the channel numbers to actual energies.
From the EPICS MCA Record description: “The relationship between calibrated units (cal) and channel number (chan) is defined as
cal=CALO + chan*CALS + chan^2*CALQ
. The first channel in the spectrum is defined as chan=0.” Here,CALO
is the offset,CALS
the slope, andCALQ
the quadratic term of the polynomial.Examples
To calibrate your MCA with a number of channels with the given calibration parameters (offset, slope, quadratic term), use:
calibration = MCAChannelCalibration() # Set the calibration parameters calibrated_values = calibration.calibrate(n_channels=4096)
The
MCAChannelData
object will usually perform the calibration transparently for you if necessary. Even better, this object knows how many channels the MCA has.- calibrate(n_channels=0)
Return calibrated values for given number of channels.
From the EPICS MCA Record description: “The relationship between calibrated units (cal) and channel number (chan) is defined as
cal=CALO + chan*CALS + chan^2*CALQ
. The first channel in the spectrum is defined as chan=0.” Here,CALO
is the offset,CALS
the slope, andCALQ
the quadratic term of the polynomial.- Parameters:
n_channels (
int
) – Number of channels of the MCA- Returns:
calibrated_values – Calibrated values for the given number of channels.
- Return type:
- class evedata.evefile.entities.metadata.ScientificCameraMetadata
Bases:
AreaChannelMetadata
Metadata for scientific camera data.
This class complements the class
evedata.evefile.entities.data.ScientificCameraData
.Examples
The
ScientificCameraMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.SampleCameraMetadata
Bases:
AreaChannelMetadata
Metadata for consumer digital cameras used to take photos of samples.
This class complements the class
evedata.evefile.entities.data.SampleCameraData
.- fractional_x_position
Fractional position of the beam in x direction in image coordinates
The fractional position allows to specify the beam position independent of the image resolution.
- Type:
- fractional_y_position
Fractional position of the beam in y direction in image coordinates
The fractional position allows to specify the beam position independent of the image resolution.
- Type:
- average_frames
Number of frames averaged
Note
May currently not be implemented in the EPICS IOC.
- Type:
Examples
The
SampleCameraMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.NonencodedAxisMetadata
Bases:
AxisMetadata
Metadata for data of axes without encoders.
This class complements the class
evedata.evefile.entities.data.NonencodedAxisData
.Examples
The
NonencodedAxisMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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 evedata.evefile.entities.metadata.SkipMetadata
Bases:
AverageChannelMetadata
Metadata for skip detector channel.
This class complements the class
evedata.evefile.entities.data.SkipData
. See there for further details. Note that in this particular case, the class hierarchy of the data and metadata classes is not parallel, as this class inherits fromAverageChannelMetadata
. This is due to the skip detector channel being close to an average detector channel regarding its metadata, but not its actual data.- low_limit
Minimum value for first reading of the channel
If set, the value of the channel defined in
channel
is read and needs to be larger than this minimum value to start the comparison phase.- Type:
- max_attempts
Maximum number of attempts for reading the channel data.
In case of an MPSKIP EPICS channel, this value is not contained in the channel itself, but set by a counter motor axis in the same scan module. Hence, the value can only be obtained from the SCML.
- Type:
- max_deviation
Maximum deviation allowed between two values in the comparison phase.
If the
low_limit
is set, as soon as the value of the channel defined inchannel
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_attempts
channel readouts are done.- Type:
Examples
The
SkipMetadata
class 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 theevedata.evefile
subpackage. 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
Metadata
object.Sometimes, it is useful to obtain the (public) attributes from another
Metadata
object. 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.