erlab.io.plugins.da30¶
Data loader for the Scienta Omicron DA30 analyzer.
Provides a base class for implementing loaders that can load data acquired with Scienta
Omicron’s DA30 analyzer using SES.exe. Subclass to implement the actual loading.
Functions
|
Load data from a |
|
Parse an |
Classes
|
ConfigParser that preserves the case of the keys. |
- class erlab.io.plugins.da30.CasePreservingConfigParser(defaults=None, dict_type=_default_dict, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=DEFAULTSECT, interpolation=_UNSET, converters=_UNSET, allow_unnamed_section=False)[source]¶
Bases:
ConfigParserConfigParser that preserves the case of the keys.
- class erlab.io.plugins.da30.DA30Loader[source]¶
Bases:
LoaderBase- name: str = 'da30'¶
Name of the loader. Using a unique and descriptive name is recommended. For easy access, it is recommended to use a name that passes
str.isidentifier().Notes
Changing the name of a loader is not recommended as it may break existing code. Pick a simple, descriptive name that is unlikely to change.
Loaders with the name prefixed with an underscore are not registered.
- description: str = 'Scienta Omicron DA30 with SES'¶
A short description of the loader shown to users.
Added in version 3.3.0.
-
extensions:
ClassVar[set[str]] = {'', '.ibw', '.pxt', '.zip'}¶ File extensions supported by the loader in lowercase with the leading dot.
An
UnsupportedFileErroris raised if a file with an unsupported extension is passed to the loader. IfNone, the loader will attempt to load any file passed to it.If the loader supports directories, the extension should be an empty string.
Added in version 3.5.1.
-
name_map:
ClassVar[dict] = {'alpha': ['Y-Scale [deg]', 'Thetax [deg]'], 'beta': ['Thetay [deg]'], 'eV': ['Kinetic Energy [eV]', 'Energy [eV]'], 'hv': ['BL Energy', 'Excitation Energy']}¶ Dictionary that maps new coordinate or attribute names to original coordinate or attribute names. If there are multiple possible names for a single attribute, the value can be passed as an iterable.
Note
Non-dimension coordinates in the resulting data will try to follow the order of the keys in this mapping.
Original coordinate names included in this mapping will be replaced by the new names. However, original attribute names will be duplicated with the new names so that both the original and new names are present in the data after loading. This is to keep track of the original names for reference.
-
additional_attrs:
ClassVar[dict] = {}¶ Additional attributes to be added to the data after loading.
If a callable is provided, it will be called with the data as the only argument.
Notes
The attributes are added after renaming with
process_keys, so keys will appear in the data as provided.If an attribute with the same name is already present in the data, it is skipped unless the key is listed in
overridden_attrs.
- always_single: bool = True¶
Setting this to
Truedisables implicit loading of multiple files for a single scan. This is useful for setups where each scan is always stored in a single file.
- skip_validate: bool = True¶
If
True, validation checks will be skipped. IfFalse, data will be checked withvalidate.
- property file_dialog_methods¶
- erlab.io.plugins.da30.load_zip(filename, without_values=False)[source]¶
Load data from a
.zipfile from a Scienta Omicron DA30 analyzer.If the file contains a single region, a DataArray is returned. Otherwise, a DataTree containing all regions is returned.
- Parameters:
filename (
stroros.PathLike) – The path to the.zipfile or the directory containing the unzipped files.without_values (
bool, optional) – If True, the values are not loaded, only the coordinates and attributes.
- Returns:
xr.DataArrayorxr.DataTree– The loaded data. If the file contains a single region, a DataArray is returned. Otherwise, a DataTree containing all regions is returned.- Return type: