imas.ids_struct_array.IDSStructArray

class imas.ids_struct_array.IDSStructArray(parent: IDSBase, metadata: IDSMetadata)

Bases: IDSBase

IDS array of structures (AoS) node

Represents a node in the IDS tree. Does not itself contain data, but contains references to IDSStructures

__init__(parent: IDSBase, metadata: IDSMetadata)

Initialize IDSStructArray from XML specification

Parameters:
parent: IDSBase

Parent structure. Can be anything, but at database write time should be something with a path attribute

metadata: IDSMetadata

IDSMetadata describing the structure of the IDS

Methods

__init__(parent, metadata)

Initialize IDSStructArray from XML specification

append(elt)

Append elements to the end of the array of structures.

resize(nbelt[, keep])

Resize an array of structures.

Attributes

metadata

Metadata of this IDS node

value

coordinates

Coordinates of this array of structures.

has_value

True if this struct-array has nonzero size

shape

Get the shape of the contained data.

size

Get the number of elements in this array

append(elt)

Append elements to the end of the array of structures.

Parameters:
elt

IDS structure, or list of IDS structures, to append to this array

property coordinates

Coordinates of this array of structures.

property has_value : bool

True if this struct-array has nonzero size

metadata : IDSMetadata

Metadata of this IDS node

resize(nbelt: int, keep: bool = False)

Resize an array of structures.

Parameters:
nbelt: int

The number of elements for the targeted array of structure, which can be smaller or bigger than the size of the current array if it already exists.

keep: bool = False

Specifies if the targeted array of structure should keep existing data in remaining elements after resizing it.

property shape : tuple[int]

Get the shape of the contained data.

This will always return a tuple: (len(self), ).

property size : int

Get the number of elements in this array

value

Last update: 2026-01-28