evedata.evefile.controllers.info module
Information on measurements, often relevant for debugging purposes.
Measurements often contain a lot of relevant information beyond the pure data, such as the scan module structure of the scan as recreated from the saved scan description (SCML file). Getting easy access to this kind of information is particularly helpful if something went wrong or led to unexpected results.
The functionality provided in this module focuses primarily on users
carrying out lower-level debug tasks, not normal end users who just want to
work with their data, as well as on the developers of the evedata
package themselves. Note that the functionality operates mostly on
EveFile
objects,
hence the low-level user interface towards the eveH5 files, rather than the
high-level Measurement
objects targeted
at end users.
Available functionality
-
Collect basic information of the scan module structure of a scan.
Future plans
EngineLogInformation
(preliminary name!)Collect information necessary to identify the engine log files.
When something went wrong, one of the first steps admins usually try to do (if the incident is not too far in the past) is to have a look at the engine log files. However, currently it is rather tedious to identify the relevant log files, and although only with eveH5 structure v7.1 all relevant information will be available from an eveH5 file, a tool to collect the relevant information and do some “informed guessing” on older files is rather useful.
The relevant information contains: timestamp of start and end of the measurement, host the engine runs on, user who started the engine, and the port the engine listens on (currently not available from the eveH5 files).
Extending the
ScanModuleStructure
classDisplay positionings for each scan module (if present)
Module documentation
- class evedata.evefile.controllers.info.ScanModuleStructure(scan_modules=None)
Bases:
object
Collect basic information of the scan module structure of a scan.
Operating on the
EveFile.scan_modules
attribute of theEveFile
class, this class extracts and collects basic information on the scan modules the given scan consists of. Hence, this class is basically aimed at debugging purposes, or for providing a first overview of the scan structure and the devices in each of the scan modules.The (abbreviated) output showing the scan module structure of a real measurement file may look like:
+ 1: Dynamic Axis Snapshot - #1 [1] + 2: Dynamic Channel Snapshot - #1 [2] + 3: Motor - #47 [3..555] A Det-S (OMSMn:pi01700000) A Det-P (OMSMn:pi01700001) ... + 4: Motor - #56 [4..272] A SX700-Wavelength (nmEnerg:io1200000wl2e) C Keysight_1 (A2980:23303chan1)
As you can see from this example, the output attempts to have minimal markup, to allow to focus on the contents. For each of the scan modules (marked by a
+
), the ID, name, number of positions and first (and last) position are extracted. For each of the devices of a scan module, the type (A: axis, C: channel), the name and ID are extracted. The names are those used in the GUI of the measurement program, while the IDs are what you will find when opening an eveH5 file (e.g., with thehdfview
program).The resulting structure can be excessively configured, using the respective attributes described below. However, usually the default should be fine, and it is designed with a minimum markup in mind.
Note
Operating on the
EveFile.scan_modules
attribute of theEveFile
class, the resulting scan structure may not in all details reflect the original scan module structure, particularly given that the special MPSKIP scans will usually be processed already. See thempskip
module for details.- scan_modules
Scan modules read from a given eveH5 file containing the SCML file.
Typically, this is the
EveFile.scan_modules
attribute of theEveFile
class.- Type:
- indentation
Indentation used to label nested scan modules (and their devices).
Default: two spaces
- Type:
- device_indentation
Indentation used to label devices of scan modules.
Default: four spaces
- Type:
- Parameters:
scan_modules (
dict
) –Scan modules read from a given eveH5 file containing the SCML file.
Typically, this is the
EveFile.scan_modules
attribute of theEveFile
class.- Raises:
ValueError – Raised if no scan modules are available to operate on.
Examples
Suppose you have loaded an eveH5 file using the
EveFile
class, and the loaded eveH5 file contained the scan description (SCML file).eve_file = EveFile() eve_file.load(filename="my_measurement_file.h5") scan_module_structure = ScanModuleStructure(eve_file.scan_modules) scan_module_structure.create()
This would create a textual overview of the scan structure in terms of its scan modules and the devices contained in each of the scan modules, and store this as a list of strings in the
structure
attribute.However, usually you are interested in a straight output of the structure, as you would like to debug something. Hence, simply replace
create()
withprint()
and you are done:eve_file = EveFile() eve_file.load(filename="my_measurement_file.h5") scan_module_structure = ScanModuleStructure(eve_file.scan_modules) scan_module_structure.print()
This will create an output similar to what is shown as an example above at the beginning of the class documentation.
- property structure
Structure of the scan modules and their devices.
The structure is created using the
create()
method, and it can be plotted conveniently using theprint()
method.