trajectory_finalization#
Attributes#
Functions#
Function to apply some final postprocessing common to all input routines that allow reading of single trajectories from input formats. |
|
|
Helper function to apply default settings to dataset variables |
Helper method to perform some standardized renaming operations as well as some |
Module Contents#
- NodeType#
- DataType#
- finalize_loaded_trajectory(dataset: shnitsel.data.tree.TreeNode[Any, DataType], loading_parameters: shnitsel.io.shared.helpers.LoadingParameters | None) shnitsel.data.tree.TreeNode[Any, DataType]#
- finalize_loaded_trajectory(dataset: DataType, loading_parameters: shnitsel.io.shared.helpers.LoadingParameters | None) DataType
- finalize_loaded_trajectory(dataset: None, loading_parameters: shnitsel.io.shared.helpers.LoadingParameters | None) None
Function to apply some final postprocessing common to all input routines that allow reading of single trajectories from input formats.
- Parameters:
dataset (xr.Dataset | Trajectory | Frames | NodeType | None) – The dataset to perform finalization on. Only updates Dataset, Trajectory and Frames data. All other data will be returned unchanged
loading_parameters (LoadingParameters | None) – Parameters to set some defaults.
- Returns:
The same type as the original dataset parameter but potentially with some default values and conversions applied.
- Return type:
xr.Dataset | Trajectory | Frames | NodeType | None
- set_state_defaults(dataset, loading_parameters)#
Helper function to apply default settings to dataset variables for state names and state types if they have not been assigned at some point earlier during the configuration process.
- Parameters:
dataset (xr.Dataset) – The dataset to set state name and state type information on.
loading_parameters (LoadingParameters | None) – Currently unused settings to be applied to trajectory import.
- Returns:
The dataset but with default values for state types and state names
- Return type:
xr.Dataset
- normalize_dataset(ds)#
Helper method to perform some standardized renaming operations as well as some restructuring, e.g. if a multi-index is missing.
May also convert some legacy attributes to promoted dimensionless variables.
- Parameters:
ds (xr.Dataset) – Dataset to normalize according to current Shnitsel standards
- Returns:
The renamed dataset.
- Return type:
xr.Dataset