...
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
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 data_access_tutorial |
Now, the following code will create a new MDS+ pulse file for shot=
...
15000, run=
...
1 in the '
...
data_access_tutorial' database of the current user
...
:
Code Block |
---|
import imas import getpass from imas import imasdef #creates the Data Entry object 'data_entry' associated to the pulse file with shot=5417815000, run=01, belonging to database 'westpcss_tutorial' of the current user 'g2lfleur', using the MDS+ backend data_entry = imas.DBEntry(imasdef.MDSPLUS_BACKEND, 'westdata_access_tutorial, 5417815000, 01, user_name=’g2lfleur’getpass.getuser()) #opens#creates the pulse file associated to the Data Entry object 'data_entry' previously created data_entry.opencreate() |
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 |
#close the pulse file associated to the 'data_entry' object
data_entry.close() |
The pulse file has been created at location ~/public/imasdb/data_access_tutorial/3/0:
Code Block |
---|
$ ls -alh ~/public/imasdb/data_access_tutorial/3/0
total 78M
drwxrwsr-x 2 fleuryl fleuryl 4.0K Aug 31 10:09 .
drwxrwsr-x 12 fleuryl fleuryl 4.0K Aug 31 10:09 ..
-rw-rw-r-- 1 fleuryl fleuryl 42M Aug 31 10:09 ids_150000001.characteristics
-rw-rw-r-- 1 fleuryl fleuryl 37 Aug 31 10:09 ids_150000001.datafile
-rw-rw-r-- 1 fleuryl fleuryl 36M Aug 31 10:09 ids_150000001.tree |
open
The following code opens the existing MDS+ pulse file created previously Now, the following code will create a new MDS+ pulse file for shot=15000, run=1 in , from the 'pcssdata_access_tutorial' database of the current user:
Code Block |
---|
import imas import getpass from imas import imasdef #creates the Data Entry object 'data_entry' associated to the pulse file with shot=15000, run=1, belonging to database 'pcssdata_access_tutorial' of the current user, using the MDS+ backend data_entry = imas.DBEntry(imasdef.MDSPLUS_BACKEND, 'pcssdata_access_tutorial, 15000, 1, user_name=getpass.getuser()) #creates#opens the pulse file associated to the Data Entry object 'data_entry' previously created data_entry.createopen() |
put/putSlice
get/getSlice
...