NSTX logo Overview Programming Diagnostics Applications
FAQ Web Tools UNIX & VMS MDSplus
software
NSTX home Frequently Asked Questions Web Tools list Unix & VMS tools S/W Overview Programming Diagnostic info S/W Details
How to plot Ip for an NSTX-U shot in Python

On the PPPL Linux Cluster, on the command line:
module purge
module load nstx/mdsplus_alpha
module load python
(The above will soon not need the "_alpha") Get into python:
python
and
import matplotlib.pyplot as plt
import MDSplus as mds

shot = 141398
tree = 'wf'
node = '\IP'	# or \IP1 in the Engineering tree

skylark = mds.Connection('skylark')  

skylark.openTree(tree, shot)	
data = skylark.get(node).value  
time = skylark.get('dim_of({})'.format(node)).value  

plt.plot(time, data)  
newtitle = node + ' for '+str(shot)
plt.title(newtitle)
plt.show()


Edited 23-Feb-2017 by: nstxops