|NSTX-U Data Analysis
You may access NSTX-U data in MDSplus through the Web Tools . (From outside PPPL, you will have to be authenticated at the firewall.) This web interface has some limitations, such as no dragging the mouse to select plot ranges. For such interactive features, on the Linux cluster, consider the SCOPE utility, jScope (jScope output example), EFITviewer, or other IDL-based programs, such as mdsw.pro.
Most of the common signals of general interest are in the scope displays the Physics Operators put up on the Display Wall. See for example /p/nstxops/util/scopes/wall_physics.scope. EFIT signal names of common interest can be found in /p/nstxops/util/scopes/efit02_params.scope.
Jscope is a powerful web-based utility distributed with MDSplus (now available on the Linux cluster at PPPL).
MDSplus may be analyzed from a variety of stand-alone tools, such as Scope, or even Excel (see NSTX-U MDSplus Data Plotting and Listing Tool on the web). There are MDSplus access routines for C, FORTRAN, Visual Basic, Labview, Perl, AVS Express, and probably many other languages. Many people find IDL the best programming language for custom applications. Tutorials and documentation are available.
Use the NSTX-U Transp Runs Listing Tool web tool.
Most LOCUS features are available from VMS for the NSTX-U databases , which are MS-SQL databases. Locus was partially ported to Unix, as well.
However, much more friendly tools now exist, and are being supported. See " Relational Database tools", below.
EFIT declares the MDSplus event 'phoenixDone_p1' when 'EFIT01' is loaded and 'phoenixDone_p2' when 'EFIT02' is loaded.
Standard MDSplus data acquisition declares an event when each CAMAC module is acquired (this event name is typically the one used in Scope files for automatic update). If you know the digitizer of such a signal, you can find the event name in Traverser (or maybe some standard Scope file). When an analyzed signal is stored in an MDSplus tree, the program must explicitly declare an event. This can be anything, and you need to find someone who knows what it is.
Once the appropriate event is known, there are MDSplus routines to wait for it. These are accessible from other languages, such as IDL. For combinations of events, the most general way is to use the MDSplus Event Management System (MEMS).
If trees are designed with some care and attention to local style, benefits accrue. To create nodes in the NSTX-U Model Tree, you can use Traverser, TCL, or IDL. See nstxops for advice and examples.
If signals are on different timebases, mathematical operations on the signals will NOT cause automatic interpolation. Brian Nelson's SigMath TDI routines are probably the easiest way to automatically convert signals to a common timebase.
At PPPL, there is an interpolation function (INTERP.FUN) for TDI that calls a FORTRAN routine built into a shared image on VMS. If you call MDSCONNECT before executing TDI on Unix, this function will work there, as well. Interpolation with this function assumes the signals have been created/built with time as the dimension.
In pages like mdsplotlist.html you can have a list of signals (or signals and Y limits) in a spreadsheet or text file, copy the text, and click on "Paste a Column of signals from the clipboard" in one of these pages. On the PC, THIS WORKS WITH INTERNET EXPLORER but NOT WITH MOZILLA (they consider such pasting a security risk). It doesn't work with Safari on a Mac; if you have another browser you simply must use, send email to nstxops. See pastehelp.html for more information.
If you have cookies enabled in your browser, most pages should remember the signals you last used. If you have a few different sets you typically use, you can use mdsplotlist.html , mdsplotlist2.html , mdsplotlist3.html , ... mdsplotlist5.html , and each should recall it's own signals.
If you really just want to save the plot, you can email yourself a Postscript or PDF file containing the plot (see below).
After you have made something you like with a web plotting page, you simply check the box labeled "Postscript" or "PDF" below "Plot File", check "E-mail file to:", enter your e-mail in the field beside that, and then click on "Plot". The pathname where the postscript file can be found is also displayed in your web browser.
For printing plots similar to the MDSplus Scope Plotting Tool, you may wish to use printscope.pro from VMS or Unix/Linux.
Bitmaps from a screen capture, Gif files or Jpeg files can be copied and pasted or placed into applications on a personal computer, but these generally look pixelated, and can look horrible when resized. Postscript graphics can look much more professional.
Make a Postscript file from IDL (using !p.font=0 will allow your fonts to be settable in Adobe Illustrator or Canvas, e.g.). You can also make Postscript files from many applications, and many canned IDL programs, by printing to a file. Many Web Plotting tools have an option to have Postscript or PDF files e-mailed to the user.
Open the Postscript file in Adobe Illustrator (if you need to rotate it, "Edit...Select All" and go to "Object...Transform...Rotate...", enter 90 and click "OK". Then select "File...Document Setup..." click on the landscape icon, and then click OK). Select "File...Save a Copy..." and select the file type to be "Illustrator EPS" and click "Save". In the resulting dialog box, under Preview, Format:, select TIFF and click on Opaque. When you insert this .eps file into Word or PowerPoint, it will look good, even when resized.
If you want to make high-quality figures from screen-dumps or bit-maps, see HiRes_JPEGs_from_Bitmaps.txt
You can use the shell 'here-document' operator <<. E.g,
$idl << EOF create_f90_html_doc, filelist exit EOFThis also works in shell scripts.
(from Nigel Wade, University of Leicester, Leicester on IDL newsgroup)
See run_idl_from_script.html for another example.
If you want to have an argument (e.g., entering a shot number) for the batch invocation, do the following from Unix at PPPL:
% cp $NSTXUSR/util/idl_cvs/idlbatch.pl . % chmod +x idlbatch.pl % idlbatch.pl myroutine 111340Where "myroutine" is the routine (with one required argument) you want to invoke (in this example, passing in 111340 for the argument)
if "myroutine.pro" has multiple arguments, keywords, etc., enclose the argument string in quotes, e.g.,
% idlbatch.pl myroutine "111340, option='hi there'"
IDL has commands to create MPEG files. $NSTXUSR/util/idl_cvs/mpeg_from_screen.pro is a simple example of creating a color Mpeg animation with text overlayed, handling both 8- and 24-bit color monitors.
However, the quality and/or speed may not be satisfactory when creating Mpegs using the standard IDL calls. Code may be found on the internet to create AVI files from IDL on a PC. AVI players usually allow speed control, and you may choose from a variety of compression/quality tradeoffs. Examples of better ways to make MPEGs using Unix commands include:
There is a bug or incompatiblity somewhere that causes an error like:
ld.so.1: /usr/pppl/rsi/idl_5.3/bin/bin.solaris2.sparc/idl: fatal: relocation error: file /usr/openwin/lib/libGL.so.1: symbol XPanoramiXQueryVersion: referenced symbol not found KilledUse a Linux computer, such as nstxpool (if you are in the "nstx" unix group) or one of the portal computers.
You need a "backing store." Use the RETAIN keyword to the DEVICE or WINDOW commands. See idl_intro.html#BACKSTORE
combw3.pro plots freq. vs. time of NSTX-U MHD data. The latest version (on Linux) allows two graphics windows, each of which allows "scrolling back" to previous plots. Any modifications you make to the color palette of each window is retained for ladter plots to that window.
See $NSTXUSR/util/misc/mhd/combw3.pro, or just run combw3 in IDL (it should be in your path if you have done a "module load nstx/mdsplus" or a "module load idl").
Steve Sabbagh's method is documented at http://w3.pppl.gov/~sabbagh/PHOENIX/PHOENIXdoc.html
Or see How_to_make_a_gfile.txt, which also contains a description of the variables in these structures.
In both EFIT and LRDfit trees, tags \zbdry and \rbdry give the z & r coordinates of the plasma boundary at the times of the fits (each are 2-D arrays). \nbdry specifies the # of points to use from \zbdry and \rbdry at each time. See /p/nstxops/util/idl_cvs/plasmaedge.pro for an example of extracting the plasma boundary at a particular time (and the limiter positions).
IDL Analyst has extensive support for IMSL routines. This package is an add-on to IDL, and PPPL only pays for 2 concurrent users. Documentation is in a pdf file called "IDL Advanced Math and Statistics" in the pdf subdirectory of the idl help (e.g. /usr/pppl/itt/idl/idl82/help/pdf). You can see if this feature is working by:
IDL> print, imsl_beta([1,2,3,4,5,6,7,8], [1,2,3,4,5,6,7,8]^1.1) 1.00000 0.148404 0.0256832 0.00465998 0.000862022 0.000160824 3.01080e-05 5.64111e-06
Since PPPL only has 2 concurrent licenses, if 2 people have an IDL session active that has accessed an IMSL routine, no one else will be able to use IDL Analyst. To see who has licenses checked out:
[bdavis@sunfire06 bdavis]$ license-status idl_analyst Server: email@example.com idl_analyst: (Total of 1 license issued; Total of 1 license in use) "idl_analyst" v8.200, vendor: idl_lmgrd floating license eric sunfire62.pppl.gov sunfire62.pppl.gov/sunfire62.ppp (v8.2) (voltron2.pppl.gov/1700 1137), start Fri 6/26 9:43
Edited 3-Oct-2016 by: Bill Davis