...
Let's check that the database has been successfully created:
Code Block |
---|
$<g2lfleur@s52 ls~>ls -alh ~/public/imasdb/data_access_tutorial/ total 26.5K0K drwxrwsrdrwxr-xr-x 3 3 fleurylg2lfleur fleurylg2itmdev 42.0K AugSep 3116 1013:0929 . drwxrwsrdrwxr-xr-x 145 fleurylg2lfleur fleurylg2itmdev 42.0K AugSep 3116 1013:0929 .. drwxrwsrdrwxr-xr-x 1312 fleurylg2lfleur fleurylg2itmdev 42.0K Sep 16 13 11:1629 3 |
Some sub-directories have been created, they are used by MDS+ to organize the pulse files.
...
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, 'data_access_tutorial, 15000, 1, user_name=getpass.getuser()) #creates the pulse file associated to the Data Entry object 'data_entry' previously created data_entry.create() #here, we can perform some read/write operations using the get/put() operations #... we will #closes the data_entry data_entry.close() |
...