imas.backends.imas_core.al_context.ALContext¶
- class imas.backends.imas_core.al_context.ALContext(ctx: int)¶
Bases:
objectHelper class that wraps Access Layer contexts.
Provides:
Object oriented wrappers around AL lowlevel methods which require a context
Context managers for creating and automatically ending AL actions
Methods
__init__(ctx)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.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
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
-
global_action(path: str, rwmode: int, datapath: str =
'') ALContext¶ Begin a new global action for use in a
withcontext.
- read_data(path: str, timebasepath: str, datatype: int, dim: int) Any¶
Call ual_read_data with this context.
- 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.