Accessing MDSplus Data from IDL
This page keeps the minimal MDSplus access patterns that were buried inside the older tutorial pages. Start by making sure your environment is correct on the cluster using the setup page.
Direct MDSplus Calls
server = 'skylark.pppl.gov:8501'
shot = 121031
MDSCONNECT, server
MDSOPEN, 'EFIT01', shot
psirz = MDSVALUE('\EFIT01::TOP.RESULTS.GEQDSK:PSIRZ')
r = MDSVALUE('\EFIT01::TOP.RESULTS.GEQDSK:R')
z = MDSVALUE('\EFIT01::TOP.RESULTS.GEQDSK:Z')
MDSCLOSE
MDSDISCONNECT
The exact tree and node paths depend on the diagnostic or analysis tree you are targeting.
Local Helper Routines
Older PPPL workflows also used local helper routines such as OpenMDSshot and
MDSGetSig to wrap the raw calls.
stat = OpenMDSshot('nstx', shot)
signal = MDSGetSig('\ip1', XAXIS=timebase, XUNITS=xunits, YUNITS=yunits)
Those helper routines are still a legacy dependency for some internal code, but the direct MDSplus calls above are the clearer baseline.
Related Tasks