Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 2

...

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

...

HLI API

...

(

...

Ludovic)

As an example, we will describe

HLI API (Ludovic)

For this tutorial, we will use 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 Python code given below is assumed to be executed in the same user Python session.

...

Using get() and put() operations

In this tutorial, in order to illustrate the use of get() and put() operations

...

For use-case 1, 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

...

Opening and reading some (realistic) dynamic data read from an existing 'magnetics' IDS contained in a WEST pulse file

The following code opens and reads a 'magnetics' IDS from WEST shot=54178, run=0 in the 'west' database of user 'g2lfleur':

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
west_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
west_data_entry.open()
#reads the 'magnetics" IDS
west_data_entry.magnetics.get()

#copy the data of the first flux_loop to the new 'magnetics' IDS of the previously created data_entry
data_entry.magnetics.flux_loop

...

Using put() and putSlice() operations

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

...