imas.util.find_paths

imas.util.find_paths(node: IDSBase, query: str) list[str]

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

Matching is checked with re.search().

Parameters:
node: IDSBase

An IDS node (e.g. an IDS or sub-structure) to search in.

query: str

Regular Expression. See the Python doumentation for re for more details.

Returns:

A list of matching paths.

Example

>>> factory = imas.IDSFactory()
>>> core_profiles = factory.new("core_profiles")
>>> imas.util.find_paths(core_profiles, "(^|/)time$")
['profiles_1d/time', 'profiles_2d/time', 'time']

Last update: 2026-01-28