imas.util.print_metadata_tree¶
-
imas.util.print_metadata_tree(structure: IDSMetadata | IDSBase, maxdepth: int =
2) None¶ Print a tree of IDS metadata.
This can be used to inspect which child nodes the Data Dictionary allows for the provided structure.
- Parameters:
- structure: IDSMetadata | IDSBase¶
IDS (structure) node or metadata belonging to an IDS node.
- maxdepth: int =
2¶ Control how deep to descend into the metadata tree. When set to 0, all descendants are printed (caution: this can give a lot of output).
Examples
core_profiles = imas.IDSFactory().core_profiles() # Print tree of the core_profiles IDS imas.util.print_metadata_tree(core_profiles) # Print descendants of the profiles_1d array of structure only: imas.util.print_metadata_tree(core_profiles.metadata["profiles_1d"]) # Print descendants of the profiles_1d/electrons structure only: electrons_metadata = core_profiles.metadata["profiles_1d/electrons"] imas.util.print_metadata_tree(electrons_metadata)
Last update:
2026-01-28