evedataviewer.dataset module
dataset module of the evedataviewer package.
Quick&dirty reimplementation of the ASpecD concept of a dataset.
This module will be obsolete as soon as the radiometry package based on the ASpecD framework starts to exist.
For the time being, only a subset of the interfaces of the respective classes are implemented, to allow for a convenient drop-in replacement with the radiometry package.
- class evedataviewer.dataset.Dataset
Bases:
object
Quick&dirty reimplementation of ASpecD concept of dataset.
Will be replaced by proper dataset class based on the ASpecD framework.
- data
Actual data of the dataset.
The data stored in here are acted upon by all processing, analysis, plot and other steps.
- Type:
- device_data
Series of devices and their corresponding data.
The keys of the dict correspond to the names of the devices. The actual device data, i.e. the values corresponding to the keys, are stored as
Data
.- Type:
- subscans
Information on subscans contained in the data of the dataset.
- boundaries
list
List of two-element lists containing the boundaries of each subscan
The first element starts with 0 as first index, the last element ends with the length of the data vector as last element.
- current
int
Index of the current subscan
Set to -1 to temporarily disable subscans.
- Type:
- boundaries
- metadata
All relevant metadata for the dataset.
Currently, a plain dict, but will be replaced with appropriate classes.
- Type:
- property preferred_data
Names of the devices used as preferred data.
Preferred data are used for both, axes and data values. Valid names for the preferred data are the keys of the
device_data
property.Setting preferred data will change data and axes values in
data
accordingly.
- property devices
Names of the devices data are available for.
Device data are stored in
device_data
, the names of the devices are the keys of thedevice_data
dict.- Returns:
devices – List of strings with device names
- Return type:
- property subscan
Current subscan of data, including data and axes.
The subscan is a copy of the original data. Hence, all manipulations on a subscan are not reflected back to the original data.
Both, subscan boundaries and index of the current subscan are set within the
subscans
property. If the index of the current subscan is set to -1, the full data are returned.- Returns:
subscan – Current subscan of data, including data and axes.
- Return type:
- import_from(importer)
Import data from an external source using an importer.
- Parameters:
importer (
evedataviewer.io.Importer
) – Importer object used to import the data
- plot(figure=None)
Plot data
- Parameters:
figure (
matplotlib.figure.Figure
) – Figure to plot data (in)to
- class evedataviewer.dataset.Data
Bases:
object
Quick&dirty reimplementation of ASpecD concept of data.
Will be obsolete as soon as the radiometry package based on the ASpecD framework starts to exist.
- class evedataviewer.dataset.Axis(quantity='', unit='')
Bases:
object
Quick&dirty reimplementation of ASpecD concept of axis.
Will be obsolete as soon as the radiometry package based on the ASpecD framework starts to exist.
- class evedataviewer.dataset.DatasetMetadata
Bases:
object
Metadata for a dataset.
This class contains the minimal set of metadata for a dataset, i.e.,
Dataset
.- measurement
Metadata of measurement
- Type:
- class evedataviewer.dataset.MeasurementMetadata
Bases:
object
General information available for each type of measurement.
- start
Date and time of start of measurement
- Type:
datetime
- end
Date and time of end of measurement
- Type:
datetime
- location
Name of the place the measurement has taken place.
Usually the (internal) name of the corresponding beamline or measuring station.
- Type:
- property duration
Duration of the measurement.
- Returns:
duration – Time difference between start and end of measurement
- Return type: