Create DBEntry using AL5 URI with path parameterΒΆ

This example focuses on creating DBEntry using explicit path.

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.

ctx = imas_open('imas:mdsplus?path=./testdb_mdsplus',mode);
imas_close(ctx);
% ls testdb_mdsplus
% -> ids_001.characteristics  ids_001.datafile  ids_001.tree
% Structure of this directory does not depends on entry content. All IDS data are stored in printed files

ctx = imas_open('imas:hdf5?path=./testdb_hdf5',mode);
imas_close(ctx);
% ls ./testdb_hdf5 
% -> master.h5
% Structure of this directory depends on entry content. Every IDS with data will be stored in <ids_name>.h5 file

ctx = imas_open('imas:ascii?path=./testdb_ascii',mode);
imas_close(ctx);
% ls ./testdb_ascii
% -> {empty}
% Structure of this directory depends on entry content. Every IDS with data will be stored in <ids_name>.ids file