Open DBEntry using AL5 URI with legacy parametersΒΆ
This example focuses on opening DBEntry using legacy parameters in URI.
See also
API documentation for imas_open()
user = getenv('USER');
db_name = 'test';
pulse = '1';
run = '10';
dd_major_version = '3';
backend = 'hdf5';
mode = 43;
% mode: Low level IMAS pulse file access mode. Available options:
%
% - 40: ``OPEN_PULSE`` (default).
% Opens the access to the data only if the Data Entry exists,
% returns error otherwise.
% - 41: ``FORCE_OPEN_PULSE``.
% Opens access to the data, creates the Data Entry if it does not
% exist yet.
% - 42: ``CREATE_PULSE``.
% Creates a new empty Data Entry (returns error if Data Entry
% already exists) and opens it at the same time.
% - 43: ``FORCE_CREATE_PULSE``.
% Creates an empty Data Entry (overwrites if Data Entry already
% exists) and opens it at the same time.
uri = strcat('imas:',backend,'?user=',user,';shot=',pulse,';run=',run,';database=',db_name,';version=',dd_major_version);
% Available backends are:
% - ascii - only for debugging purposes
% - mdsplus
% - hdf5
% - memory - data is lost after entry is closed
% - uda
ctx = imas_open(uri, mode);
% You can access IDSes in here - take a look at sample code dealing with IDSes for details
imas_close(ctx);