Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A Data Entry is an IMAS concept for designating a pulse experiment  with given shot and run number located in some database (see below).

Methods exposed by High Level Interfaces:

  • —Operations on data base entry
    • —CREATE
    • —OPEN
    • —DELETE
    • —CLOSE
  • —Operations on IDSes  - AL operates at the IDS level (with some exceptions) providing only methods for “atomic” operations such as:
    • —PUT
    • —GET
    • —PUT_SLICE
    • —GET_SLICE

In this tutorial, we will illustrate the use of the HLI API using 2 use-cases:

  • in the first use-case 1, we will create a new pulse file and we will store a new 'magnetics' IDS and populate this IDS with some dynamic (

...

  • 1D) data read from an existing WEST pulse file
  • in a second use-case 2, we will create a 'camera_visible' IDS and we will append new frames to this IDS which will be written to the previously created pulse file

HLI API (Ludovic)

For this tutorial, we will use As an example, we will describe the Python HLI. Documentation of all others HLIs is available in the User guide available from this page: https://confluence.iter.org/display/IMP/Integrated+Modelling+Home+Page

Warning
Each piece of code given below is assumed to be executed in the same user Python session.

Using get() and put() operations

...

(use-case 1)

For use-case 1In this tutorial, in order to illustrate the use of get() and put() operations, we will:

  1. create a new pulse file
  2. open and read some (realistic) dynamic data read from an existing 'magnetics' IDS contained in a WEST pulse file (using open() and get() operation of the Access Layer)
    1. these data will be appended to a new 'magnetics' IDS
  3. write the new magnetics IDS to the new pulse file created at step 1
  4. close the two pulse files
  5. check the content of the pulse file. For this purpose we will:
    • open the newly created pulse file
    • read the new magnetics IDS
    • display the dynamic data which has beed added in the IDS

...

Code Block
#
#opens the Data Entry object 'data_entry' associated to the pulse file with shot=54178, run=0, belonging to database 'west' of user 'g2lfleur', using the MDS+ backend
data_entry = imas.DBEntry(imasdef.MDSPLUS_BACKEND, 'west, 54178, 0, user_name='g2lfleur')
#opens the pulse file associated to the Data Entry object 'data_entry' previously created
data_entry.open()
#reads the 'magnetics" IDS
data_entry.magnetics.get()

Using put() and putSlice() operations (use-case 2)

In this tutorial, in order to illustrate the use of getSlice() and putSlice() operations, we will:

...