shnitsel.data.dataset_containers.inter_state#

Classes#

InterState

Definition of the protocol to support instantiation from

Module Contents#

class InterState(frames=None, /, direct_interstate_data=None)#

Bases: shnitsel.data.dataset_containers.shared.ShnitselDerivedDataset

Definition of the protocol to support instantiation from xarray dataset structs.

Parameters:
_original_frames: shnitsel.data.dataset_containers.data_series.DataSeries | None#
property delta_energy: xarray.DataArray#
Return type:

xarray.DataArray

property energy_interstate: xarray.DataArray#
Return type:

xarray.DataArray

property dipole_transition: xarray.DataArray#
Return type:

xarray.DataArray

property dipole_transition_norm: xarray.DataArray#
Return type:

xarray.DataArray

property nacs: xarray.DataArray#
Return type:

xarray.DataArray

property nacs_norm: xarray.DataArray#
Return type:

xarray.DataArray

property socs: xarray.DataArray#
Return type:

xarray.DataArray

property socs_norm: xarray.DataArray#
Return type:

xarray.DataArray

property fosc: xarray.DataArray#
Return type:

xarray.DataArray

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:

tuple[str, xr.Dataset, MetaData]

Raises:

ValueError – If the conversion failed for some reason.

classmethod get_type_marker()#
Return type:

str

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