cherab.imas.ids.common.resolve_ids_path_referenceΒΆ

cherab.imas.ids.common.resolve_ids_path_reference(ids: IDSToplevel | IDSStructure | IDSStructArray, reference: IDSPathReference | str) IDSToplevel | IDSStructure | IDSStructArraySourceΒΆ

Resolve an IDS path reference against an already loaded IDS object.

Parameters:
ids: IDSToplevel | IDSStructure | IDSStructArrayΒΆ

The loaded IDS root object to resolve the path against.

reference: IDSPathReference | strΒΆ

Parsed IDS path reference or a string in the form #ids[:occurrence][/idspath].

Returns:

IDSToplevel | IDSStructure | IDSStructArray – The resolved IDS object.

Raises:

ValueError – If the reference does not target the provided IDS root, or the path syntax is invalid.