imas.backends.imas_core.al_context.ALArrayStructContext¶
- class imas.backends.imas_core.al_context.ALArrayStructContext(ctx, size)¶
Bases:
ALContextHelper class that wraps contexts created through al_begin_arraystruct_action.
Methods
__init__(ctx, size)Construct a new ALContext object
arraystruct_action(path, timebase, size)Begin a new arraystruct action for use in a
withcontext.close()Close this ALContext.
delete_data(path)Call ual_delete_data with this context.
global_action(path, rwmode[, datapath])Begin a new global action for use in a
withcontext.iterate_over_arraystruct(step)Call al_iterate_over_arraystruct with this context.
iterate_to_index(index)Call al_iterate_over_arraystruct to iterate to the provided index.
list_all_occurrences(ids_name)List all occurrences of this IDS.
read_data(path, timebasepath, datatype, dim)Call ual_read_data with this context.
slice_action(path, rwmode, time_requested, ...)Begin a new slice action for use in a
withcontext.timerange_action(path, rwmode, tmin, tmax, ...)Begin a new timerange action for use in a
withcontext.write_data(path, timebasepath, data)Call ual_write_data with this context.
Attributes
AoS size
Current iteration index of this AoS context
Context identifier
- arraystruct_action(path: str, timebase: str, size: int) ALArrayStructContext¶
Begin a new arraystruct action for use in a
withcontext.
- close()¶
Close this ALContext.
- ctx¶
Context identifier
- curindex¶
Current iteration index of this AoS context
-
global_action(path: str, rwmode: int, datapath: str =
'') ALContext¶ Begin a new global action for use in a
withcontext.
- iterate_to_index(index: int) None¶
Call al_iterate_over_arraystruct to iterate to the provided index.
- read_data(path: str, timebasepath: str, datatype: int, dim: int) Any¶
Call ual_read_data with this context.
- size¶
AoS size
- slice_action(path: str, rwmode: int, time_requested: float, interpolation_method: int) ALContext¶
Begin a new slice action for use in a
withcontext.- Parameters:
- path: str¶
access layer path for this global action:
<idsname>[/<occurrence>]- rwmode: int¶
read-only or read-write operation mode:
READ_OP/WRITE_OP- time_requested: float¶
time-point requested. Use
UNDEFINED_TIMEfor put_slice.- interpolation_method: int¶
interpolation method to use:
CLOSEST_INTERP,LINEAR_INTERPorPREVIOUS_INTERPfor get_slice;UNDEFINED_INTERPfor put_slice.
- Returns:
The created context.