...
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:
...
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. |
...
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 putSlice()/getSlice() operations (use-case 2)
In this tutorial, in order to illustrate the use of getSlice() and putSlice() operations, we will:
...