imas.util

Collection of useful helper methods when working with IMAS-Python.

Functions

calc_hash(node)

Calculate the hash of the provided IDS object.

find_paths(node, query)

Find all paths in the provided DD node (including children) that match the query.

get_data_dictionary_version(obj)

Find out the version of the data dictionary definitions that this object uses.

get_full_path(node)

Get the full path (relative to the IDS toplevel) of the provided node.

get_parent(node)

Get the parent of any IDS node.

get_time_mode(node)

Retrieve ids_properties/homogeneous_time for any node in the IDS.

get_toplevel(node)

Retrieve the toplevel IDS object for any node in the IDS.

idsdiff(struct1, struct2)

Generate a diff betweeen two IDS structures and print the result to the terminal.

idsdiffgen(struct1, struct2, *[, accept_lazy])

Generate differences between two structures.

inspect(ids_node[, hide_empty_nodes])

Inspect and print an IDS node.

is_lazy_loaded(node)

Find out if the provided (node of an) IDS is lazy loaded.

print_metadata_tree(structure[, maxdepth])

Print a tree of IDS metadata.

print_tree(structure[, hide_empty_nodes])

Print the full tree of an IDS or IDS structure.

resample(node, old_time, new_time[, ...])

Resample all primitives in their time dimension to a new time array

to_xarray(ids, *paths)

Convert an IDS to an xarray Dataset.

tree_iter(node, *[, leaf_only, visit_empty, ...])

Tree iterator for IMAS-Python structures.

visit_children(func, node, *[, leaf_only, ...])

Apply a function to node and its children


Last update: 2026-01-28