Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

 

 

VI related notice
I will use VI in every place where text files are modified. If you have any other text file editor of your choice - fell free to use it instead.
get() CPO vs IDS
Code Block
languagepy
titleITM
linenumberstrue
#system libraries
import numpy
import sys

#UAL library
import ual

#Open the database
itm_obj = ual.itm(123,3,123,0)
itm_obj.open() 
        
cpoArray = itm_obj.pfsystemsArray

#Get data
cpoArray.get()

# SCALARS (!)
for i in range(len(cpoArray)):
      print "Time = " + str(cpoArray[i].time)
      print "Value = "+ str(cpoArray[i].x.y)






#close the pulse file
imas_obj.close()

 

 
Code Block
languagepy
titleIMAS
linenumberstrue
#system libraries
import sys
import numpy

#UAL library
import imas

#Open a database
imas_obj = imas.ids(11, 22)
imas_obj.open()  

ids = imas_obj.core_profiles

#Get data
ids.get()

# SCALARS (!)
for i in range(len(ids.time)):
    print 'Time   =' + str(ids.time[i]) 
    print 'Value  =' + str(ids.x.y[i])

# VECTORS (!)
print 'Time  = '  + str(ids.time)
print 'Value  = ' + str(ids.x.y)


#close the pulse file
imas_obj.close()

 

 

 

...