imas.ids_coordinates.IDSCoordinate

class imas.ids_coordinates.IDSCoordinate(coordinate_spec: str)

Bases: object

Class representing a coordinate reference from the DD.

Example

  • Coordinates are an index:

    • 1...N: any number of items allowed

    • 1...3: max 3 items allowed

  • Coordinates refer to other quantities:

    • time: refers to the time quantity in the IDS toplevel

    • profiles_1d(itime)/time: refers to the time quantity in the profiles_1d IDSStructArray with (dummy) index itime

  • Coordinates specify alternatives:

    • distribution(i1)/profiles_2d(itime)/grid/r OR distribution(i1)/profiles_2d(itime)/grid/rho_tor_norm: coordinate can be r or rho_tor_norm (only one may be filled)

    • coherent_wave(i1)/beam_tracing(itime)/beam(i2)/length OR 1...1: either use length as coordinate, or this dimension must have size one.

__init__(coordinate_spec: str)

Methods

__init__(coordinate_spec)

format_refs(element)

Return a comma-separated list of paths representing self.references.

Attributes

size

Exact size of this dimension.

references

A tuple paths that this coordinate refers to.

has_validation

True iff this coordinate specifies a validation rule.

has_alternatives

True iff exclusive alternative coordinates are specified.

is_time_coordinate

True iff this coordinate refers to time.

format_refs(element: IDSBase) str

Return a comma-separated list of paths representing self.references.

Useful when constructing error messages to users.

has_alternatives : bool

True iff exclusive alternative coordinates are specified.

has_validation : bool

True iff this coordinate specifies a validation rule.

is_time_coordinate : bool

True iff this coordinate refers to time.

references : tuple[imas.ids_path.IDSPath]

A tuple paths that this coordinate refers to.

size : int | None

Exact size of this dimension. For example, 2 when coordinate = 1…2.


Last update: 2026-01-28