shnitsel.data.shnitsel_db.grouping_methods¶
Classes¶
Helper class to retain certain key metadata to differentiate different trajectories |
Functions¶
|
If there are Trajectories below this level, introduces new groups, grouping them by specific metadata except when all of them already have the same metadata. |
Module Contents¶
- class ShMetadataKeys¶
Bases:
NamedTupleHelper class to retain certain key metadata to differentiate different trajectories
- input_type: typing_extensions.Literal[static, dynamic, unknown]¶
- to_groupname()¶
- group_subtree_by_metadata(subtree)¶
If there are Trajectories below this level, introduces new groups, grouping them by specific metadata except when all of them already have the same metadata.
- Parameters:
subtree (xr.DataTree) – The subtree for which to recursively perform the grouping.
- Returns:
Either the grouped subtree or a pair of the metadata of the subtree and the subtree to be grouped in the Trajectory group of that metadata combination.
- Return type:
xr.DataTree | tuple[ShMetadataKeys, xr.DataTree]