shnitsel.data.dataset_containers.inter_state#
Classes#
Definition of the protocol to support instantiation from |
Module Contents#
- class InterState(frames=None, /, direct_interstate_data=None)#
Bases:
shnitsel.data.dataset_containers.shared.ShnitselDerivedDatasetDefinition of the protocol to support instantiation from xarray dataset structs.
- Parameters:
frames (shnitsel.data.dataset_containers.data_series.DataSeries | None)
direct_interstate_data (xarray.Dataset | None)
- _original_frames: shnitsel.data.dataset_containers.data_series.DataSeries | None#
- property delta_energy: xarray.DataArray#
- Return type:
- property energy_interstate: xarray.DataArray#
- Return type:
- property dipole_transition: xarray.DataArray#
- Return type:
- property dipole_transition_norm: xarray.DataArray#
- Return type:
- property nacs: xarray.DataArray#
- Return type:
- property nacs_norm: xarray.DataArray#
- Return type:
- property socs: xarray.DataArray#
- Return type:
- property socs_norm: xarray.DataArray#
- Return type:
- property fosc: xarray.DataArray#
- Return type:
- as_xr_dataset()#
Base function to implement by classes supporting this protocol to allow for standardized conversion to a dataset
- Returns:
A tuple of the io_type_tag under which the deserializer is registered with the Shnitsel Tools framework (or None if no deserialization is desired/supported)/ Then the `xr.Dataset that is the result of the conversion. And lastly a dict of metadata that might help with deserialization later on.
- Return type:
- Raises:
ValueError – If the conversion failed for some reason.
- classmethod from_xr_dataset(dataset, metadata)#
Class method to support standardized deserialization of arbitrary classes. Implemented as a class method to avoid need to construct instance for deserialization.
- Parameters:
cls (type[ResType]) – The class executing the deserialization.
dataset (xr.Dataset) – The dataset to be deserialized into the output type.
metadata (MetaData) – Metdatata from the serialization process.
- Returns:
The deserialized instance of the target class.
- Return type:
instance of cls
- Raises:
TypeError – If deserialization of the object was not possible