Graphical User Interfaces for SPECTRUM


Graphical user interfaces using the Tcl/Tk  Tool Command Language and graphical interface have been designed for both SPECTRUM and BLACKWEL.  These GUIs are intended to make using SPECTRUM and BLACKWEL more easy.

Tcl/Tk GUI for SPECTRUM

The script spectrum_sh.tcl is a Tcl/Tk graphical user interface for SPECTRUM.  It is included in the SPECTRUM releases of versions 2.65 and later.  The file spectrum_sh.tcl should be placed in a directory in your path.  I put it in /usr/local/bin.  Make certain that 1) you have Tcl/Tk installed on your computer (it is a standard feature on most Linux distributions, but may need to be installed on some UNIX and Linux distributions.  It is available at the Tcl Developer Xchange. ) and 2) that spectrum_sh.tcl has executable permissions set.

This shell may be invoked by typing at the prompt:

> spectrum_sh.tcl

The GUI will come up and should look like the figure below:

TclTk shell

The buttons on the top row can be used to select the atmosphere model, the atomic data file (atom.dat), the isotope definition file (isotope.iso), the spectral line list (luke.lst) and the output file.  The computation parameters are self-explanatory and must be supplied.  The shell enables the user to apply a number of switches which control the operation of SPECTRUM.  Please read the documentation to understand the meaning of these switches.  On the first row, the default output (Normalized Intensity), absolute flux, or center of disk switches can be set (corresponding to: no switch, f and m, respectively).  On the second row, the isotope facility may be turned on (the isotope definition file must have been selected above) and/or the facility to read ATLAS9 default headers (switch t) can be selected.  If selected, the output spectrum may then be smoothed using MACTURB (which convolves the spectrum with a macroturbulent  velocity line profile), AVSINI, which rotationally broadens the output spectrum, and SMOOTH2, which convolves the output spectrum with a Gaussian function.  Please note that for all of the above to work, the auxiliary programs MACTURB, AVSINI and SMOOTH2 must have been compiled and placed in the path (/usr/local/bin or some other directory in your path).  To execute, press the Execute button.  To see the progress as SPECTRUM steps through the wavelength region, click the Progress check box.  Pressing Quit will exit the shell.

Please note that this shell is not absolutely foolproof.  Please pay very close attention to the "*"ed boxes - i.e. the isotope box and the output spacing box for the Smooth option. 


Tcl/Tk GUI for BLACKWEL

Before attempting to use this shell, please read over the documentation for Blackwel.  This shell is also included in the 2.65 and later distributions, and is called blackwell_sh.tcl.  It should be copied to a directory in your path (e.g. /usr/local/bin) and it should be confirmed that the executable permission has been set.  To invoke this shell, type at the prompt:

> blackwell_sh.tcl

The GUI illustrated below should appear:

Blackwell Tcl/Tk shell

To run this shell, you must have installed on your machine the latest version (4.0 or later) of gnuplot.

To run this shell, select the stellar atmosphere model (67244k2p00.mod is provided to test this shell with - please use it with the feI.eqw file also provided), the atomic data file (atom.dat) and an equivalent width file for a single species (the file feI.eqw is provided).  The equivalent width file contains equivalent widths for lines measured in an observed stellar spectrum.  The stellar atmosphere model that you use should be appropriate for the star you are studying.  Select a range of microturbulent velocities over which you want Blackwel to do its computations and then press Execute.  For this set of files, you will get the following graph, courtesy of gnuplot:

gnuplot output

Each sloping line in this graph corresponds to a spectral line in the file feI.eqw.  This is a plot of the Microturbulent velocity against the abundance (in this case) of iron.  Notice that (somewhat ideally!) all of the lines seem to converge at a point in the plot.  This gives the optimal value for the abundance of iron and the characteristic microturbulent velocity in the atmosphere of the star under consideration.  If you have chosen the temperature and gravity of the star correctly, you will get nearly the same answer for Fe II lines.  And, for other species, you should get, within the errors, the same value of the microturbulent velocity.  The figure above is an example of a "Blackwell Diagram", which is a useful tool for determining microturbulent velocities and abundances in a consistent way in stellar atmospheres.

Please note that the lines can fail to converge in a Blackwell diagram if 1) one or more of your lines is in an undetected blend, 2) the gf values for one or more of your lines are not good, 3) your choice of a stellar atmosphere to model your star is not good, or 4) your line is strongly affected by non-LTE effects.  You should use a stellar atmosphere computed with a microturbulent velocity which is as close as possible to the value indicated by the Blackwell Diagram as possible, for the sake of consistency.  The model atmosphere 67244k2p00.mod was computed with a microturbulent velocity of 2km/s.  Since the diagram above indicates that the microturbulent velocity is closer to 1.2 km/s, it would be better to select a model computed with a microturbulent velocity of 1 km/s.

Please note that Blackwell cannot be used with hydrogen or helium lines (both He I and He II).  Ideally, lines used to compute Blackwell diagrams should be weak to medium strength lines.  The cores of strong lines are often not well computed in the LTE approximation.  A range of line strengths is required in a Blackwell diagram.  The weak lines (which are not strongly affected by microturbulence) are nearly horizontal in a Blackwell diagram.  Stronger lines have a steeper slope.

Note that blackwell_sh.tcl outputs data you can use to reconstruct the above graph in individual data files labeled with the wavelength of the line.

The shell blackwell_sh.tcl can be directed to give the above plot in postscript format.