...
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 (Data Model and Access Layer User Guide)
...
open
The following code opens the existing MDS+ pulse file for shot=54178, run=0, from the 'west' database of user 'g2lfleur':
Code Block |
---|
import imas from imas import imasdef #creates the Data Entry object 'data_entry' associated fromto the pulse file with shot=54178, run=0, belonging to database 'pcss_tutorialwest' of user 'g2lfleur', using the MDS+ backend data_entry = imas.DBEntry(imasdef.MDSPLUS_BACKEND, 'pcss_tutorialwest, 54178, 0, user_name=’g2lfleur’) #opens the pulse file associated to the Data Entry object 'data_entry' previously created data_entry.open() |
create
Creating a new Data Entry using the MDS+ backend consists in creating a new pulse file on disk. Therefore, you need to have write permissions for the database specified in the create() command.
So, let's first create a new database belonging to the current user.
From a new shell, execute the following command:
Code Block |
---|
module load IMAS
imasdb pcss_tutorial |
Now, the following code will create a new MDS+ pulse file for shot=15000, run=1 in the 'pcss_tutorial' database of the current user:
Code Block |
---|
import imas import getpass from imas import imasdef #creates the Data Entry object 'data_entry.open' associated to the pulse file with shot=15000, run=1, belonging to database 'pcss_tutorial' of the current user, using the MDS+ backend data_entry = imas.DBEntry(imasdef.MDSPLUS_BACKEND, 'pcss_tutorial, 15000, 1, user_name=getpass.getuser()) #creates the pulse file associated to the Data Entry object 'data_entry' previously created data_entry.create() |
put/putSlice
get/getSlice
...