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:
EnumEnum representing the possible data types in an IDS
- __init__(value)¶
Methods
parse(data_type)Parse data type string from the Data Dictionary.
Attributes
IDS structure.
IDS array of structures.
String data.
Integer data.
Floating point data.
Complex data.
Default value for a field with this type.
Lowlevel identifier for this type.
Python type for 0D instances of this type.
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:
- 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.