imas.ids_metadata.IDSMetadata

class imas.ids_metadata.IDSMetadata(structure_xml: Element, context_path: str, parent_meta: IDSMetadata | None)

Bases: object

Container for IDS Metadata stored in the Data Dictionary.

Metadata is everything saved in the attributes of variables in IDSDef.xml. This includes for example documentation, its units, and coordinates.

Metadata of structure (and array of structures) child nodes can be obtained with the indexing operator:

core_profiles = imas.IDSFactory().core_profiles()
# Get the metadata of the time child of the profiles_1d array of structures
p1d_time_meta = core_profiles.metadata["profiles_1d/time"]

Note

This class should not be instantiated directly, use get_toplevel_metadata() instead.

__init__(structure_xml: Element, context_path: str, parent_meta: IDSMetadata | None)

Methods

__init__(structure_xml, context_path, ...)

Attributes

identifier_enum

The identifier enum for this IDS node (if available).

name

Name of the IDS node, for example "comment".

maxoccur

Maximum number of occurrences allowed in the MDS+ backend.

data_type

Data type of the IDS node.

ndim

Number of dimensions (rank) of the IDS node.

path_string

Path of this IDS node from the IDS toplevel, for example "ids_properties/comment".

path

Parsed path of this IDS node from the IDS toplevel, see also path_string.

path_doc

Path of this IDS node from the IDS toplevel, as shown in the Data Dictionary documentation.

type

Type of the IDS node, indicating if this node is time dependent.

units

Units of this IDS node.

documentation

Data dictionary-provided documentation for this IDS node.

coordinates

Tuple of coordinates of this node.

coordinates_same_as

Indicates quantities which share the same coordinate in a given dimension, but the coordinate is not explicitly stored in the IDS.

alternative_coordinates

Quantities that can be used as coordinate instead of this node.

alternative_coordinates : tuple[imas.ids_path.IDSPath]

Quantities that can be used as coordinate instead of this node.

coordinates : tuple[imas.ids_coordinates.IDSCoordinate]

Tuple of coordinates of this node.

coordinates[0] is the coordinate of the first dimension, etc.

coordinates_same_as : tuple[imas.ids_coordinates.IDSCoordinate]

Indicates quantities which share the same coordinate in a given dimension, but the coordinate is not explicitly stored in the IDS.

data_type : IDSDataType

Data type of the IDS node.

documentation

Data dictionary-provided documentation for this IDS node.

property identifier_enum : type[IDSIdentifier] | None

The identifier enum for this IDS node (if available).

This property is an identifier enum (a subclass of imas.ids_identifiers.IDSIdentifier) if this node represents an identifier, and the Data Dictionary defines the allowed identifier values.

This property is None when this node is not an identifier, or the Data Dictionary does not define the allowed identifier values.

See also

Identifiers

maxoccur : int | None

Maximum number of occurrences allowed in the MDS+ backend. Applies to IDS toplevels and Arrays of Structures.

name : str

Name of the IDS node, for example "comment".

ndim : int

Number of dimensions (rank) of the IDS node.

path : IDSPath

Parsed path of this IDS node from the IDS toplevel, see also path_string.

path_doc : str

Path of this IDS node from the IDS toplevel, as shown in the Data Dictionary documentation. For example "time_slice(itime)/profiles_2d(i1)/r(:,:)".

path_string : str

Path of this IDS node from the IDS toplevel, for example "ids_properties/comment".

type : IDSType

Type of the IDS node, indicating if this node is time dependent. Possible values are dynamic (i.e. time-dependent), constant and static.

units : str

Units of this IDS node. For example "m.s^-2".


Last update: 2026-01-28