evedata.measurement.entities.metadata module
Metadata corresponding to a measurement.
A measurement generally reflects all the data obtained during a
measurement. However, to plot data or to perform some analysis, usually we
need data together with an axis (or multiple axes for nD data),
where data (“intensity values”) and axis values come from different HDF5
datasets. Furthermore, there may generally be the need/interest to plot
arbitrary data against each other, i.e. channel data vs. channel data
and axis data vs. axis data, not only channel data vs. axis data. This
is the decisive difference between the Measurement entity
and the
Measurement facade
, with the latter
having the additional attributes for storing the data to work on.
Metadata are a crucial part of reproducibility. Furthermore, metadata allow
analysis routines to gain a “semantic” understanding of the data and hence
perform (at least some) actions unattended and fully automatically. While all
metadata corresponding to the individual devices used in recording data are
stored in the metadata
attribute of the Data
class
(and its descendants), there are other types of metadata that belong to the
measurement as such itself. These are modelled in the metadata
module in the Metadata
class.
Overview
A first overview of the classes implemented in this module and their hierarchy is given in the UML diagram below.
Fig. 43 While the Metadata
class inherits directly
from its counterpart from the evedata.evefile.entities.file
module,
it is extended in crucial ways, reflecting the aim for more reproducible
measurements and having datasets containing all crucial information in
one place. This involves information on both, the machine (BESSY-II, MLS)
and the beamline, but on the sample(s) as well. Perhaps the sample
attribute should be a dictionary rather than a plain list, with (unique)
labels for each sample as keys.
As of now, the eveH5 files do not contain any metadata regarding machine, beamline, or sample(s). The names of the machine and beamline can most probably be inferred, having the name of the beamline obviously allows to assign the machine as well.
Given that one measurement (i.e. one scan resulting in one eveH5 file)
can span multiple samples, and will often do, in the future, at least some
basic information regarding the sample(s) should be added to the eveH5 file
and read and mapped accordingly to instances of the Sample
class, one instance per
sample. Potentially, this allows to assign parts of the measured data to
individual samples and hence automate data processing and analysis, e.g.
splitting the data for the different samples into separate datasets/files.
Key aspects
xxx
Module documentation
- class evedata.measurement.entities.metadata.Metadata
Bases:
Metadata
Metadata of a given measurement resulting in an eveH5 file.
As measurements result in individual files, there is a series of crucial metadata of such a measurement on this global level.
In addition to the
base class
, information on the machine, beamline, and sample(s) measured are stored.- start
Timestamp of the start of the measurement
- Type:
- end
Timestamp of the end of the measurement
- Type:
- preferred_axis
Name of the axis marked as preferred in the scan description.
Default: “”
- Type:
string
- preferred_channel
Name of the channel marked as preferred in the scan description.
Default: “”
- Type:
string
- preferred_normalisation_channel
Name of the channel marked as preferred for normalising.
Default: “”
- Type:
string
- machine
Metadata for the machine (BESSY-II, MLS) used for the measurement.
- Type:
Machine
- beamline
Metadata for the beamline used for the measurement.
- Type:
Beamline
- Raises:
exception – Short description when and why raised
- class evedata.measurement.entities.metadata.Sample
Bases:
object
Metadata of a given sample that has been measured.
As multiple samples can be measured within one measurement, the
Metadata
class associated with aMeasurement
contains a list ofSample
objects in itsMetadata.sample
attribute.