shnitsel.data.tree.tree_completion#
Attributes#
Functions#
|
Function to generate a full -- i.e. up to ShnitselDBRoot -- Shnitsel DB structure. |
Module Contents#
- DataType#
- build_shnitsel_db(data, dtype=None)#
Function to generate a full – i.e. up to ShnitselDBRoot – Shnitsel DB structure.
Wraps trajectories in DataLeaf structures, extends the tree with missing parent structures.
- Parameters:
data (ShnitselDBRoot[DataType] | CompoundGroup[DataType] | DataGroup[DataType] | DataLeaf[DataType] | DataType | Sequence[CompoundGroup[DataType]] | Sequence[DataGroup[DataType] | DataLeaf[DataType]] | Sequence[DataType]) – Input data to be wrapped in a ShnitselDB format
dtype (type[DataType] | UnionType, optional) – The datatype that data in this tree should have. If not provided will be inferred from the data in the tree.
- Returns:
The resulting ShnitselDB dataset structure.
- Return type:
ShnitselDBRoot[DataType]
- Raises:
ValueError – If an unsupported data argument was provided.:
ValueError – If a list of xr.DataTree objects on incompatible Levels of the ShnitselDB hierarchy was provided, e.g. a mix of DataLeaf and CompoundGroup nodes.:
ValueError – If the provided data is of no ShnitselDB format type.:
- complete_shnitsel_tree#