Create DBEntry from scratch using legacy modeΒΆ

This example focuses on creating DBEntry using legacy mode method.

See also

API documentation for imas_create_env(), imas_open_env()

Warning

The legacy method is deprecated from AL>=5.0.0.

It is recommended to use the URI approach instead.

user             = getenv('USER');
db_name          = 'test';
pulse            = 1;
run              = 10;
dd_major_version = '3';
backend_id       = 13;

%     backend_id: ID of the backend to use. Available options:
%           - 11: :ref:`ASCII backend`
%           - 12: :ref:`MDSplus backend`
%           - 13: :ref:`HDF5 backend`
%           - 14: :ref:`Memory backend`
%           - 15: :ref:`UDA backend`

% create data entry object (using legacy method, deprecated from AL5)
% this time we are creating completly new entry

ctx = imas_create_env(db_name, pulse, run, 0, 0, user, db_name, dd_major_version);

% to open existing entry use imas_open_env (name, shot, run, user, tokamak, dd_major_version)

% You can access IDSes in here - take a look at sample code dealing with IDSes for details