imas.ids_data_type.IDSDataType

class imas.ids_data_type.IDSDataType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Enum representing the possible data types in an IDS

__init__(value)

Methods

parse(data_type)

Parse data type string from the Data Dictionary.

Attributes

STRUCTURE

IDS structure.

STRUCT_ARRAY

IDS array of structures.

STR

String data.

INT

Integer data.

FLT

Floating point data.

CPX

Complex data.

default

Default value for a field with this type.

al_type

Lowlevel identifier for this type.

python_type

Python type for 0D instances of this type.

numpy_dtype

Numpy dtype for array instances of this type.

CPX = 'CPX'

Complex data.

FLT = 'FLT'

Floating point data.

INT = 'INT'

Integer data.

STR = 'STR'

String data.

STRUCTURE = 'structure'

IDS structure. Maps to an IDSStructure object.

STRUCT_ARRAY = 'struct_array'

IDS array of structures. Maps to an IDSStructArray object with IDSStructure children.

al_type

Lowlevel identifier for this type.

default

Default value for a field with this type.

numpy_dtype

Numpy dtype for array instances of this type.

static parse(data_type: str | None) tuple[IDSDataType | None, int]

Parse data type string from the Data Dictionary.

Parameters:
data_type: str | None

Data type string from the DD.

Returns:

IDSDataType instance representing the parsed data type and number of dimensions.

Examples

>>> IDSDataType.parse("STR_1D")
(<IDSDataType.STR: 'STR'>, 1)
>>> IDSDataType.parse("struct_array")
(<IDSDataType.STRUCT_ARRAY: 'struct_array'>, 1)
>>> IDSDataType.parse("structure")
(<IDSDataType.STRUCTURE: 'structure'>, 0)
>>> IDSDataType.parse("CPX_5D")
(<IDSDataType.CPX: 'CPX'>, 5)
python_type

Python type for 0D instances of this type.


Last update: 2026-01-28