IMPSPEC

IMPSPEC is a series of tools for visualizing and analyzing survey spectroscopy data to obtain line brightness time histories.  The goal is not to extract all of the information from the spectra, but provide an easy interface to extract the most relevant bits to inform plasma operations and physic studies that are interested in tracking impurity contamination.  Data are stored in an intuitive way in MDSPlus with descriptors of the emission, allowing for easy integration into DWSCOPE and JSCOPE.

The code is written in IDL and kept in /p/nstxusr/nstx-users/mreinke/GENIE/IMPSPEC/ under version control from the central GITHUB repository.  This directory is readable from skylark, allowing automated between shot analysis and manual creation of tree nodes.

IMSPEC Compatible Diagnostcs

IMPSPEC was written to analyze data from the XEUS and LoWEUS spectrometers as deployed at Alcator C-Mod.  These and other similar flat-field VUV/SXR survey spectroscopy have limited spectral resolution so detailed analysis of Doppler or Zeeman features is not possible.  This makes for a simplified analysis where the main goal is to extract a time evolving brightness of a single line from a region of contaminating neighboring lines. 

NSTX-U compatible diagnostics would be:  XEUS, LoWEUS, MONA-LISA and SPRED.

Presently there is no ability to deal with multi-channel spectroscopy such as from imaging VUV system (TGIS), but this is expected to be integrated at some point in the future.  Similarly, an interest to expand to deal with visible spectroscopy is anticipated.

.ispec file format

A base set of ASCII files are located in  /IMPSPEC/ispec/ with the element name and suffix .ispec.  An example of N.ispec is below:

N,7

nlines=3

###NOTES###

line=0                          ;line indicator

220.0,222.0                     ;wavelength range to fit

inst=0.2                        ;instrumental width

nlines=1                        ;number of lines to fit

221.15,Ar XV,Be                 ;primary line of interest then interfering lines

###DATA###

line=0

spec=xeus

24.5,25.2

inst=0.05

nlines=5

24.782,N VII,H

24.9006,N VI (n=3),He

24.8640,Ar XVI,Li

25.0240,Ar XVI,Li

24.7400,Ar XV,Be

line=1

spec=xeus

28.5,29.8

inst=0.05

nlines=2

28.7861,N VI,He

29.0835,N VI,He

line=2

spec=xeus

20.6,21.25

inst=0.05

nlines=1

20.9100,N VII (n=3),H

###END###

There are three sections:  header, notes and data

HEADER

The header is very simple, containing the element abbreviation and atomic number on the first line and the number of lines that the ispec file contains

N,7

nlines=3

NOTES

The notes section is completely free-form.  Any information can be included and is meant for the user to offer any description.  By default a description of the line information is included as a remindar.  Nothing in this section impacts the operation of IMPSPEC - so feel free to use it however you see fit!  This section is ended by ###DATA###

###NOTES###

line=0                          ;line indicator

220.0,222.0                     ;wavelength range to fit

inst=0.2                        ;instrumental width

nlines=1                        ;number of lines to fit

221.15,Ar XV,Be                 ;primary line of interest then interfering lines

DATA

This section contains the data that will be used to fit.  Multiple instruments can be called, the example here only looks at the primary He-like (N VI) and H-like (N VII) nitrogen transitions.  There are text blocks for each of the nlines  specified in the header.  Each block contains a variable length amount of data depending on the complexity of the spectra to be analyzed.  How these data are used is described in "How IMPSPEC Works".  This section is ended by ###END###.

###DATA###

line=0

spec=xeus

24.5,25.2

inst=0.05

nlines=5

24.782,N VII,H

24.9006,N VI (n=3),He

24.8640,Ar XVI,Li

25.0240,Ar XVI,Li

24.7400,Ar XV,Be

You can generate alternative .ispec files for non-standard shots where you might want to fit spectral features not normally seen.  For example, compare above to /p/nstxusr/nstx-users/mreinke/GENIE/IMPSPEC/ispec/N.ispec.long which includes a number of N IV and N V lines on LoWEUS.

 

How IMPSPEC Works

The data for each line are used to isolate a portion of specific diagnostic's spectrum and fit a constrained multi-peak Gaussian fitting to the data.

The IDL code MPFIT is used to do the multi-peak fit with the following constraints:

IMPSPEC Tree

example of IMPSPEC tree layout

In the PASSIVESPEC tree, there is an IMPSPEC node, below which there are an arbitrary number of element nodes (ie B, N, etc), and a PROF node.

In each of the elements nodes, there are the following:

Each of the LINE nodes contains the following:

As can be seen, there are a number of features laid out in the tree structure that have yet to be implemented.  The goal is to have the capability for between shot impurity transport simulation to estimate the brightness time history per unit impurity density.  This would then allow the impurity density to be estimated from the line brightness, correcting for temperature and density dependence in the brightness.  Presently only the capability to compute the line brightness is implemented.

Creating or Modifying IMPSPEC trees

To load GENIE (and IMPSPEC) on skylark so that tree modifications can be made:

@/home/mreinke/skylark_genie_startup.pro

ADD_IMPSPEC,shot,z=z is used to add the PASSIVESPEC.IMPSPEC node and the corresponding element nodes for the 1D INTARR, z.  For example, ADD_IMPSPEC,shot,z=[7,8] would add the IMPSPEC.N and IMPSPEC.O nodes and fill them with the relevant number of lines in the .ispec file.  This same program can be used to remove it via ADD_IMPSPEC,shot,/rm

These will use the /p/nstxusr/nstx-users/mreinke/GENIE/IMPSPEC/ispec/X.ispec files by default.  You can use the WRITE_ISPEC2NODE,shot,path,/rm,/tree to overwrite the IMPSPEC.X node with the structure outlined in the X.ispec file defined by the path.  The /tree keyword automatically puts the new X.ispec into the tree.  This process allows new X.ispec stored in the users local directory can be added.

If you do not need to rewrite the tree structure, i.e. if you're just tweaking settings within the same number of lines, then the X.ispec file can be written to the tree using WRITE_ISPEC2TREE,shot,path. 

Running IMPSPEC Manually and Viewing Results

To load GENIE (and IMPSPEC) on nstxpool run @/p/nstxusr/nstx-users/mreinke/GENIE/mach/nstxu/genie_ini.bat in IDL.

Spectral analysis is done for each element separately, using RUN_IMSPEC,shot,z.  In this way, the entire set of impurities can be run in-parallel, allowing all the line brightness data to be analyzed between shots.  Data are written to the tree.

Scope

A DWSCOPE for viewing the results is in /u/mreinke/scopes/impspec.dat 

This needs to be manually updated as the number of elements is expanded

Widget

A widget to view the line fits for each Z and LINE# is in /p/nstxusr/nstx-users/mreinke/GENIE/widgets/w_impspec.pro  This can be compiled after running the above genie_ini.bat and then run using w_impspec.  This will also need some manual updates as the number of lines are updated, or the zlist optional input can be used to set what impurities to look for.

example of impspec widget

***need to input details on how to use this widget***  2/10/16

Running IMPSPEC on the NSTX-U Shot Cycle

TBD once the LLNL suite is installed!  Currently IMPSPEC is not in the model tree and will be added once the spectrometers are installed.  There are shell scripts that will be run for each element.

Comments

IMPSPEC (and this page) is maintained by M.L. Reinke (mreinke@pppl.gov) x3908.  Please send any comments or questions and bug reports to me or stop by B236!