NSTX home Frequently Asked Questions Web Tools list Unix & VMS tools S/W Overview Programming Diagnostic info S/W Details

Accessing Fast 2D Camera Data on NSTX

There are a variety of Fast 2-D Cameras on NSTX. For example, see some of the papers written.

For the Phantom camera files ("cine" files, with a ".cin" extension), a popular viewing option is the IDL routine fcplayer.pro. For a list of options and more examples, see FCplayer.html. See BlobTracking.html for details on feature tracking within FCplayer.pro.

FCplayer allows you to search for shot files. You may also use the following from the Linux command line; to see what cameras have data for a particular shot, say shot 130370:
    findufc 130370
Current year Fast Camera data is on /p/nstxcam. Fast Camera data for previous years is on /p/nstxcam-archive. For the location of various cameras on the machine (as of 2010) and their directories on the Linux cluster see Fast_Camera_Dirs.txt.

cineload.pro and cine_time.pro may be used for reading into an IDL program (cine_open.pro and cine_read.pro are in beta test as of August, 2009, and will probably be the best way to access .cin file data). Fast 2-D Camera files are stored under /p/nstxcam). The color Miro camera usually shows a "global" view of the entire plasma. See the Help file for more information.

If you want a quick animation of the Fast Camera data that is stored in MDSplus, try

   IDL> fcvcr, 128030, time=[0.05,0.3], maxFrames=40

See nstxmovies.html for creating movies from 1 or 2 NSTX Fast Cameras. You may also specify up to two MDSplus signals to add to the animation. E.g.,

click to enlarge [click image to enlarge]

For camera data from MDSplus with time and shot number overlayed, but no controls, try: displayfcmds.pro:

   IDL> displayfcmds, 128030, minMsec=100, maxMsec=300, loop=5
If you want other data along with the Fast Camera data stored in MDSplus, try fcmovies.pro.

For more recent camera data, the following type of call will work:

   IDL> efitmovies, "miro*135060", /thomson, /Summary
   IDL> efitmovies, 204118, /thom, /summary, xsize=800, ysize=700, maxframes=200
Note that efitmovies uses "X memory" so having too many frames will take a long time to load. If you want to see all frames in a certain time window, use keywords t1 & t2. If more than one camera file is found from searching on your first parameter, you will be able to chose the one you want (currently, only the red component is plotted for Miro files in efitmovies).

click to enlarge
(Since this application, like xinteranimate, stores frames in memory on your X-client, displaying more than a few 100 frames can cause significant performance problems.)

These codes can be found in the $NSTXUSR/util/idl_cvs/ directory on the PPPL Linux cluster. Two-camera animations (produced from, e.g., cine2mpeg.pro) can be found in http://nstx.pppl.gov/nstx/Software/Diagnostics/FC2008/. (A password is required when accessing some of these pages from outside PPPL; see Bill Davis or Lane Roquemore.) See SUMMARY.html in that directory for some explanation of the movies. Some MPEGs created from the 2009 are available in http://nstx.pppl.gov/nstx/Software/Diagnostics/FC2009/. Try browsing thumbnails of camera images, along with summary plots (more thumbnails at other URLs).

If you want a quick animation of .cin files with time and shot number overlayed, but no controls, try cinetvnew.pro for monochrome cameras and mirodisplay.pro for the color Miro cameras. Mpegs and Quicktime movies can be saved from fcplayer.pro.

For Photron camera files, see read_photron.pro.

Fast Camera thumbnails can be produced easily.

click to enlarge.

See cinethumbnails.html for more information.

Other ways of using Fast Camera data can be round at WhatsNew.html.

To read and plot a frame from a cine file in IDL on the PPPL Linux cluster:

     if nwords( file ) eq 0 then $
	file = FINDCAMFILES('nstx_3_142015.cin')
     ;  (faster: file ='/p/nstxcam-archive/Phantom73-6663/2010/nstx_3_142015.cin')

     if n_elements( time ) eq 0 then time=0.2

     CINE_TIME, file, times
     frame = NEARESTI( times, time )
     data = CINELOAD( file, frame )

     dims = SIZE( data, /dim )

     shot = EXTRACTSHOTNUMBER(file)

     RIGHT_ASPECT, findgen(dims[0]), findgen(dims[1]), POSITION=out_pos

     title='Shot '+strtrim(shot[0],2)+'; '+strtrim(time,2)+' sec.'
     THCONT, data, title=title, POSITION=out_pos
click to enlarge

To see a list of camera parameters, such as frame rate, filter type, exposure time, etc.:

   IDL> mdseditbranch, 142015, tree='cameras', branch='.fc_1.settings'
fc_1 is for camera 1, fc_2 for camera 2, etc.


updated: 25-Oct-2016
by: Bill Davis