CHIANTI IDL Help

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Wed Apr 26 08:51:00 2000.


List of Routines


Routine Descriptions

ADD_SUBDIR

[Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	add_subdir

 PURPOSE:

	help locate CHIANTI database files but adding subdirectories
       to parent level directory names

 CATEGORY:

	database.

 CALLING SEQUENCE:

       newdir = ADD_SUBDIR(dir,subdir)


 INPUTS:

	dir:  name of parent directory, i.e. '/data1/xuv'
       subdir:  name of subdirectory, i.e., 'abund	


 OUTPUTS:

	newdirectory:  the complete directory name
                      i.e., '/data1/xuv/abund'


 RESTRICTIONS:

	works with either unix or VMS


 EXAMPLE:

             > newdir=add_subdir('/data1/xuv','abund')
             > print,newdir
             > /data1/xuv/abund

 	Written by:	Ken Dere
	March 1996:     Version 2.0
       Sept  1996:     Modified for use with VMS

(See add_subdir.pro)


ASCII_WVL_DEM

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	ASCII_WVL_DEM

 PURPOSE:

	create an ascii file of predicted spectral line intensities and
       wavelengths corresponding to a selected abundance and differential
       emission measure (DEM).  derived from latex_wvl_dem

 CATEGORY:

	science.

 CALLING SEQUENCE:

       ASCII_WVL_DEM, Wmin, Wmax, Pressure


 INPUTS:

	Wmin:   lower limit of the wavelength range of interest (Angstroms)	
	Wmax:   upper limit of the wavelength range of interest (Angstroms)
       Pressure:  electron density (cm-3) * temperature (K), assumed constant	

 OPTIONAL INPUTS:

	Elemental abundance file:  selected with widget
       Ionization equilibrium file:  selected with widget
       Differential emission measure file:  selected with widget
	
 KEYWORD PARAMETERS:

	MINI:	Minimum intensity for line to be included in output

	SNGL_ION:  specified a single ion to be used instead of the complete
                  set of ions specified in !xuvtop/masterlist/masterlist.ions


       PHOTONS:  units will be in photons rather than ergs

       ALL:  all lines, including those with only theoretical wavelengths are printed

       MASTERLIST:  string of a specific masterlist file or set to '' to select a 
                particular masterlist file.  Otherwise, masterlist.ions is used

 OUTPUTS:

	an ascii file:   linelist.lis  in the user's home directory



 COMMON BLOCKS:

	common elvlc,l1a,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,eref
       common wgfa, wvl,gf,a_value
       common upsilon,t_type,deu,c_ups,splups
       common elements,abund,abund_ref,ioneq,ioneq_t,ioneq_ref,ionpot,ip_ref


 SIDE EFFECTS:

	Some of the ions have 100+ energy levels and the inversion of the
       necessary matrices can be time consuming


 EXAMPLE:

             > ascii_wvl_dem,100.,200.,1.e+15,mini=10.,sngl_ion='c_2'

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	September 1996:     Version 1.0
       September 1996:  mods to work with VMS
       June 1998:  include keyword /photons
       September 1999:  K. Dere, modified for Version 3.0

(See ascii_wvl_dem.pro)


BB_RAD_LOSS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

 NAME:
	bb_rad_loss

 PURPOSE:

       calculates energy loss rate by line (bound-bound) radiation

 CATEGORY:
	
	synthetic spectra

 CALLING SEQUENCE:

       BB_RAD_LOSS,Temperature,Loss_rate


 INPUTS:

	None:  the user will select various parameters such as the 
              choice of elemental abundances and ionization equilibria

  KEYWORDS:

       Pressure:  pressure in emitting region (cm^-3 K)
                  density=pressure/temperature(K)
       Density:   density (cm^-3), constant for all temperatures
                  if neither density or pressure is set, then a default constant density
                  of 10x10^10 cm^-3 is used.
	Sngl_ion:  to calculate the loses spectrum for a single ion


 OUTPUTS:

       Temperature:  array of temperatures (K)
       Loss_rate:  energy loss rate in erg cm^-3 s^-1


 PROCEDURE:


  if keyword pressure is set then calculations performed at constant pressure
  if keyword density is set then calculations performed at constant density
  otherwise, density is set to 1.e+10
  
  pressure = density * temperature  (cm^-3 K)


	the user will be asked to select an abundance file and a 
       differention emission measure (DEM) file.

 EXAMPLE:

       > bb_rad_loss,t,r


 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	January 1999:  version 1, adopted from synthetic.pro

(See bb_rad_loss.pro)


CH_DATATYPE

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:     
	CH_DATATYPE
 Purpose     : 
	Returns the data type of a variable.
 Explanation : 
	This routine returns the data type of a variable in a format specified
	by the optional flag parameter.
 Use         : 
	Result = CH_DATATYPE( VAR  [, FLAG ] )
 Inputs      : 
	VAR	= Variable to examine.
 Opt. Inputs : 
	FLAG	= Output format flag as explained below.  The default is 0.
 Outputs     : 
	The result of the function is the either a string or integer giving the
	data type of VAR.  Depending on the value of FLAG, the result will be
	one of the values from the following table:

		FLAG = 0       FLAG = 1           FLAG = 2       FLAG = 3

		UND            Undefined          0              UND
		BYT            Byte               1              BYT
		INT            Integer            2              INT
		LON            Long               3              LON
		FLO            Float              4              FLT
		DOU            Double             5              DBL
		COM            Complex            6              COMPLEX
		STR            String             7              STR
		STC            Structure          8              STC

 Opt. Outputs: 
	None.
 Keywords    : 
	HELP	= If set, then a short explanation is printed out.
 Calls       : 
	None.
 Common      : 
	None.
 Restrictions: 
	FLAG, if passed, must be an integer between 0 and 3.
 Side effects: 
	None.
 Category    : 
	Utilities, Arrays.
 Prev. Hist. : 
	Written by R. Sterner, 24 Oct, 1985.
	RES 29 June, 1988 --- added spelled out TYPE.
	R. Sterner, 13 Dec 1990 --- Added strings and structures.
	R. Sterner, 19 Jun, 1991 --- Added format 3.
	Johns Hopkins University Applied Physics Laboratory.

 Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.

 Written     : 
	R. Sterner, JHU/APL, 24 October 1985.
 Modified    : 
	Version 1, William Thompson, GSFC, 23 April 1993.
		Incorporated into CDS library.
 Version     : 
	Version 1, 23 April 1993.
 Modified:  renamed to ch_datatype.pro for distribution with CHIANTI v3
               by Ken Dere

(See ch_datatype.pro)


CH_REMCHAR

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 Project     : SOHO - CDS

 NAME:
              CH_REMCHAR

 Purpose     : 
	Remove all appearances of a character from a string.
 Explanation : 
	Remove all appearances of character (char) from string (st).
 Use         : 
	CH_REMCHAR,ST,CHAR
 Inputs      : 
	ST  - String from which character will be removed.  
	CHAR- Character to be removed from string. 
 Opt. Inputs : 
	None.
 Outputs     : 
	ST	= The modified string is returned in ST.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : 
	None.
 Common      : 
	None.
 Restrictions: 
	None.
 Side effects: 
	None.
 Category    : 
	Utilities, strings.
 Prev. Hist. : 
	Written D. Lindler October 1986
	Test if empty string needs to be returned   W. Landsman  Feb 1991
 Written     : 
	Don Lindler, GSFC/HRS, October 1986.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 April 1993.
		Incorporated into CDS library.
       Renamed ch_remchar for distribution with CHIANTI
 Version     : 
	Version 1, 12 April 1993.

(See ch_remchar.pro)


CH_REPSTR()

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

                   
 NAME: 
           CH_REPSTR()
               
 Purpose     : Replaces all occurrences of a substring within a string.
               
 Explanation : All occurrences of the specified string within a string 
               are replaced by the new string.

               eg.  IDL> x = 'abcdefgcd'
                         print,ch_repstr(x,'cd','qq')  --> 'abqqefgqq'

               See STREP for replacement of first occurrence only.
               
 Use         : IDL> new = ch_repstr(old,out_str [,in_str])
    
 Inputs      : old      - string in which to replace string.
               out_str  - string to be replaced

 Opt. Inputs : in_str  - string to be inserted in place of out_str.
                         (Default is a space).

               
 Outputs     : Function returns suitably adapted string.
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None

 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, string
               
 Prev. Hist. : Robert S. Hill, ST Systems Corp., April 1989.

 Written     : CDS version by C D Pike, RAL, 24-Jun-94
               
 Modified    : Renamed ch_repstr for distribution with CHIANTI
               K Dere 2/23/2000

 Version     : Version 1, 24-Jun-94

(See ch_repstr.pro)


CH_STRPAD

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

                   
 NAME: 
             CH_STRPAD
               
 Purpose     : Pads a string with blanks to specified width

              
 Explanation : Spaces are added in front of the input string to
		make the returned string have LENGTH characters.
		Use /AFTER to add spaces at the end.
               
 Use         : STR = CH_STRPAD(VALUE,LENGTH)
    
 Inputs      : VALUE:  A string..
		LENGTH: The desired length of the result in characters
               
 Opt. Inputs : None.
               
 Outputs     : Returns the padded string.
               
 Opt. Outputs: None.
               
 Keywords    : AFTER : Set to add spaces at the end.

 Calls       : STRLEN, STRMID

 Common      : None.
               
 Restrictions: Value must be a scalar string
               
 Side effects: If the input string is longer than the desired
		width, it is returned without truncation
               
 Category    : Utilities, Strings
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, 27 September 1993
               
 Modified    : Corrected typo which stopped /after working.  CDP, 28-Sep-94
               Increased possible length used.  CDP, 22-Dec-94
               Handle arrays of strings.  CDP, 16-Mar-95
               Renamed to ch_strpad for distribution with CHIANTI

 Version     : Version 4, 16-Mar-95

(See ch_strpad.pro)


CH_XMENU

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	CH_XMENU

 PURPOSE:
	This procedure simplifies setting up widget menus. XMENU accepts a 
	string array of menu labels, creates a widget base, and populates
	the base with buttons containing the specified labels.

 CALLING SEQUENCE:
	CH_XMENU, Values [, Parent]

 INPUTS:
	Values:	An array of labels for the butons (menu items).  
		If VALUES is a string array, then it is a 1-D array of labels.
		If it a byte array, it is a 3-D array of bitmaps, where
		the 1st 2 dimensions are the width and height of each
		bitmap.

	Parent:	The widget ID of parent base widget.  If this argument is
		omitted, the menu base is a top-level base.

 KEYWORDS:
	BASE:	A named variable to recieve the widget ID of the created base.

      BUTTONS:	A named variable to recieve the widget ID of the created
		buttons. This return value is a longword array, with each
		element matching the corresponding element in Values.

	COLUMN: This keyword specifies that the buttons should be layed out 
		in columns. The value specified gives the number of columns
		desired.

    EXCLUSIVE:	Set this keyword to make each menu selection an exclusive
		button.  Exclusive buttons have both selected and unselected 
		states and only one button at a time can be selected.

	FONT:	A string containing the name of the font for the button labels.

	FRAME:	If this keyword is specified, it represents the thickness (in
		pixels) of the frame drawn around the base.  The default is
		no frame.

 NONEXCLUSIVE:	Set this keyword to make each menu selection a non-exclusive
		button.  Non-exclusive buttons have both selected and 
		un-selected states.  More that one button can be selected at
		one time.

   NO_RELEASE:	Set this keyword to prevent the buttons from returning release
		events.  Normally, buttons return both selection and release
		events.

	ROW:	This keyword specifies that the buttons should be layed out 
		in rows.  The value specified gives the number of rows desired.

	SCROLL:	Set this keyword to give the base scrollbars to allow a large 
		number of buttons to be viewed in a small region.

	SPACE:	The space, in pixels, to be left around the edges of the base.

	TITLE:	If PARENT is not specified, TITLE specifies the MENU title.
		If PARENT is specified, a framed base is created and a
		label with the value TITLE is added before the menu. 

	XPAD:	The horizontal space, in pixels, to be left between the 
		buttons.

	YPAD:	The vertical space, in pixels, to be left between the buttons.

	UVALUE:	An array of user values to be set into the UVALUE of the
		buttons. This array must have the same number of elements
		as VALUES.

X_SCROLL_SIZE:	The width of the scrolling viewport.  This keyword implies 
		SCROLL.

Y_SCROLL_SIZE:	The height of the scrolling viewport.  This keyword
		implies SCROLL.
	
 OUTPUTS:
	None.

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A widget base containing buttons is created, but not realized.

 EXAMPLE:
	For an example of using XMENU to create menus see the "Non-Exclusive
	Menu" and "Exclusive Menu" examples in the "Simple Widget Examples".
	The simple widget examples menu can be seen by entering WEXMASTER at
	the IDL prompt.

 MODIFICATION HISTORY:
	16 January 1991, AB, RSI

	5 September 1991, SMR, RSI   Fixed bug where titles were ignored when
				     no base specified.

	21 January 1992, ACY, RSI    Added FONT keyword.
       23 February 2000, K Dere, renamed to ch_xmenu for distribution with
             CHIANTI V3 package

(See ch_xmenu.pro)


CH_XSELECT_S

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

                   
 NAME: 
           CH_XSELECT_S
               
 Purpose     : Force the user to select from a list or abort.
               
 Explanation : A menu with the supplied options is generated, as
		well as a DONE-button (to signal completion of the selection)
		and a QUIT-button (to signal abortion of the selection).
               
		Menus can be either nonexclusive or exclusive.
		A default selection can be supplied.

 Use         : CH_XSELECT_S,OPTIONS,STATUS,ABORT (all 3 parameters needed)
    
 Inputs      : OPTIONS:
			A text array containing the possible selections.

		STATUS:	An integer array containing the default selection,
			STATUS( i ) eq 1 signifies that OPTION( i ) is
			selected by default. Must have same dimensions as
                       OPTIONS parameter.
               
 Opt. Inputs : None.
               
 Outputs     : STATUS:	The resulting selection array. OPTION( i ) eq 1
			signifies selection of option no. i.

		ABORT:	Set to 1 if the user aborted the selection.
               
 Opt. Outputs: None.
               
 Keywords    : TITLE:	String with the title of the window with the menu.
			(default: 'Select options below')
		
		QUIT:	String with the text to go on the QUIT button.
			(default: 'Quit')

		DONE:	String with the text to go on the DONE button.
			(default: 'Done')

		GROUP_LEADER:
			Standard Xmanager/Widget meaning.

		X/YOFFSET: The position of the upper left corner of the
			new base.

		EXCLUSIVE/
		NONEXCLUSIVE:
			The type of base showing the selection buttons.
			Default: NONEXCLUSIVE

		MODAL:	Set to make the selection widget modal. 
			See Side effects.

 Calls       : DATATYPE

 Common      : XSELECT
               
 Restrictions: None.
               
 Side effects: The use of the MODAL keyword causes all widget
		DRAW windows to be blanked out.... Might be fixed
		in later versions of IDL...? (Depending on whether
		they see it as a bug or a feature :-)
               
 Category    : CDS, QuickLook, General
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, 18 November 1993
               
 Modified    : SVHH, Version 1.5, 3 June 1994
			Added MODAL and X/YOFFSET keywords.
		PB,   Version 1.6, 24 Aug 1994  
		        Changed button 'Done' to 'Continue'
               CDP,  Upgraded header info and set default xoffset 
                     and yoffset.  14-Feb-95
               Ken Dere, made list scrollable  Sept 1996
                         renamed ch_xelect_s

 Version     : Version 2, 14-Feb-95

(See ch_xselect_s.pro)


CONF2N

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	CONF2N

 PURPOSE:

	Extract the highest principal quantum number from the configuration


 CALLING SEQUENCE:

       CONF2N,conf,n


 INPUTS:

	Conf:  the configuration returned from read_elvlc_direct

	
 KEYWORD PARAMETERS:

	None

 OUTPUTS:

	N:  the principal quantum number




 EXAMPLE:

             > conf2n,'2s2.3p 2P1.0',n
             > print,n
             > 3

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	April 2000:     Version 3.0

(See conf2n.pro)


CONVERTNAME

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	convertname

 PURPOSE:
	Ion names as character strings are converted into
	numerical values (note c_2 is C II or C^+1
	in spectroscopic or atomic notation)

 CATEGORY:
	
	naming utility

 CALLING SEQUENCE:

       CONVERTNAME,Name,Iz,Ion


 INPUTS:
	Name:   such as 'c_2'


 OUTPUTS:

	Iz:  nuclear charge Z  (6 for 'c_2', the equivalent of C II)
       Ion:  ionization stage:  (2 for 'c_2')

 EXAMPLE:

                     > convertname,'c_2',iz,ion
                     > print,iz,ion
                     > 6,2

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       October 1999:   Version 3.  by kpd

(See convertname.pro)


DENSITY_RATIOS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	DENSITY_RATIOS

 PURPOSE:

	to calculate line intensity ratios as a function of electron density

 CATEGORY:

	scientific analysis

 CALLING SEQUENCE:

       DENSITY_RATIOS,Ion,Wmin,Wmax,Dmin,Dmax,Density,Ratio,Description


 INPUTS:

       Ion:   the CHIANTI style name of the ion, i.e., 'c_5' for C V
	wmin:  minimum of the wavelength range of interest in Angstroms
	wmax:  maximum of the wavelength range of interest in Angstroms
       dmin:  log10 of the minimum desired density (8. = 10^8 cm^(-3) )
       dmax:  log10 of the maximum desired density range

 INTERACTIVE INPUTS:

	Must select the line for the numerator and denominator 
       It is possible to select multiple lines to be summed
	
 KEYWORD PARAMETERS:

        OUTFILE:  the (optional) name of the output ascii file where a 
                   listing of the line ratio intensity as a function of 
                   density is saved.  For example, outfile='den_rat.lis'

        PSFILE:  the (optional) name of the output postscript file 
                  where a plot of the choses density sensitive line
                  ratio is saved.  For example, psfile='den_rat.ps'

        TEMP:   to specify the temperature, otherwise the temperature at the peak 
                  of the ionization equilibrium is used.  For example, temp=1.e+6

        /PHOTONS:  if set, the ratio will be in photon units, as opposed to ergs    

 OUTPUTS:

	Density:  an array of the density values for which the selected 
                 intensity ratio calculated 
       Ratio:  an array of line intensity ratios
       Description:  a string describing the transitions selected

       Plots the intensity ratio of the selected line as a function of density


 COMMON BLOCKS:

	common elvlc,l1a,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,eref
       common wgfa, wvl,gf,a_value
       common upsilon,t_type,deu,c_ups,splups



 EXAMPLE:

             > convertname,'c_2',iz,ion
             > print,iz,ion
             > 6,2

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       May 28, 1996:  Ken Dere added psfile keyword/option
       Sept 1996:     modified to work with VMS
                      and added keyword TEMP, Ken Dere
       Feb. 2000:     Modified for Version 3, K. Dere

(See density_ratios.pro)


DESCALE_UPS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	DESCALE_UPS

 PURPOSE:

	convert from Burgess-Tully scaling spline fits to Upsilons

 CATEGORY:

	science.

 CALLING SEQUENCE:

       DESCALE_UPS,Index,Jndex,xt,upsilion

 INPUTS:

	Index:	index of lower energy level (lowest level is 1)
	Jndex:	index of upper energy level (lowest level is 1)
	xt:  scaled temperature

 OPTIONAL INPUTS:

	None:
	
 KEYWORD PARAMETERS:

	None:	

 OUTPUTS:

	Upsilon:  the Maxwellian averaged collision strength



 COMMON BLOCKS:

	common elvlc,l1a,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,eref
       common wgfa, wvl,gf,a_value
       common upsilon,t_type,c_ups,splups


 PROCEDURE:

	see Burgess and Tully, 1992, Astron and Astrophys, 254, 436.

 EXAMPLE:

             ;
 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       December 1998:  Include transition type 5   (kpd)

(See descale_ups.pro)


FB_RAD_LOSS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	FB_RAD_LOSS

 PURPOSE:

	Calculate the free-bound (radiative recombination) continuum
       radiative energy losses losses.  The calculation follows the discussion
       in Radiative Processes in Astrophysics by Rybicki and Lightman except that 
       we have used observed energy levels in place of hydrogenic energy levels.


 CALLING SEQUENCE:

      FB_RAD_LOSS,Temperature,LossRate


 INPUTS:



 OPTIONAL INPUTS:

	None
	
 KEYWORD PARAMETERS:

	NO_SETUP:   If the procedure setup_elements has already been called then
                  the keyword /no_setup should be set to avoid repeating this step

       MIN_ABUND:  If set, calculates the continuum only from those elements which 
                   have an abundance greater than min_abund.  Can speed up the 
                   calculations.  For example:
                   abundance (H)  = 1.
                   abundance (He) = 0.085
                   abundance (C)  = 3.3e-4
                   abundance (Si) = 3.3e-5
                   abundance (Fe) = 3.9e-5


 OUTPUTS:

	Temperature:	temperature in degrees Kelvin, can be a 1 D array
       LossRate:       radiative energy loss rate in erg s^-1 cm^3
                       (radiative loss rate per emission measure (N_e N_H V)



 COMMON BLOCKS:

	common elements,abund,abund_ref,ioneq,ioneq_t,ioneq_ref



 EXAMPLE:

             > fb_rad_loss,t,rad
             > fb_rad_loss,t,rad,min_abund=3.e-5
             > fb_rad_loss,t,rad,/no_setup,min_abund=1.e-6


 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	April 2000:     Version 3.0

(See fb_rad_loss.pro)


FF_RAD_LOSS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
           FF_RAD_LOSS
	

 PURPOSE:

	Calculate the free-free radiative energy losses losses.
       Uses the free-free integrated gaunt factor calculations of 
       Sutherland, 1998, MNRAS, 300, 321


 CALLING SEQUENCE:

      FF_RAD_LOSS,Temperature,LossRate


 INPUTS:



 OPTIONAL INPUTS:

	None
	
 KEYWORD PARAMETERS:

	NO_SETUP:   If the procedure setup_elements has already been called then
                  the keyword /no_setup should be set to avoid repeating this step

       MIN_ABUND:  If set, calculates the continuum only from those elements which 
                   have an abundance greater than min_abund.  Can speed up the 
                   calculations.  For example:
                   abundance (H)  = 1.
                   abundance (He) = 0.085
                   abundance (C)  = 3.3e-4
                   abundance (Si) = 3.3e-5
                   abundance (Fe) = 3.9e-5


 OUTPUTS:

	Temperature:	temperature in degrees Kelvin, can be a 1 D array
       LossRate:       radiative energy loss rate in erg s^-1 cm^3
                       (radiative loss rate per emission measure (N_e N_H V)



 COMMON BLOCKS:

	common elements,abund,abund_ref,ioneq,ioneq_t,ioneq_ref



 EXAMPLE:

             > ff_rad_loss,t,rad
             > ff_rad_loss,t,rad,min_abund=3.e-5
             > ff_rad_loss,t,rad,/no_setup,min_abund=1.e-6


 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	April 2000:     Version 3.0

(See ff_rad_loss.pro)


FREEBOUND

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	FREEBOUND

 PURPOSE:

	Calculate the free-bound (radiative recombination) continuum
       following the discussion in Radiative Processes in Astrophysics by
       Rybicki and Lightman except that we have substitute observed energy
       levels for hydrogenic energy levels.


 CALLING SEQUENCE:

      FREEBOUND,Temperature,Wavelength,Intensity, [/no_setup, /min_abund]


 INPUTS:

	Temperature:	temperature in degrees Kelvin
       Wavelength:     wavelength in Angstroms


 OPTIONAL INPUTS:

	None
	
 KEYWORD PARAMETERS:

	NO_SETUP:   If the procedure setup_elements has already been called then
                  the keyword /nosetup should be set to avoid repeating this step

       MIN_ABUND:  If set, calculates the continuum only from those elements which 
                   have an abundance greater than min_abund.  Can speed up the 
                   calculations.  For example:
                   abundance (H)  = 1.
                   abundance (He) = 0.085
                   abundance (C)  = 3.3e-4
                   abundance (Si) = 3.3e-5
                   abundance (Fe) = 3.9e-5


 OUTPUTS:

	Intensity:  free-bound continuum intensity in 10^-40 erg cm^3 s^-1 str^-1 angstrom^-1 
                   per unit emission measure ( int(n^2 dh) in cm^-5)



 COMMON BLOCKS:

	common elements,abund,abund_ref,ioneq,ioneq_t,ioneq_ref



 EXAMPLE:

             > freebound,1.e+6,wvl,int
             > freebound,1.e+6,wvl,int,min_abund=3.e-5
             > freebound,1.e+6,wvl,int,/no_setup,min_abund=1.e-6


 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	April 2000:     Version 3.0

(See freebound.pro)


FREEFREE

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	FREEFREE

 PURPOSE:

	Calculate the free-free continuum from an hot, low density plasma

       Uses the free-free gaunt factor calculations of Sutherland, 1998, MNRAS, 300, 321


 CALLING SEQUENCE:

       FREEFREE,temperature, wavelength, intensity


 INPUTS:

	Temperature:	temperature in degrees Kelvin, can be a 1 D array
       Wavelength:     wavelength in Angstroms


 OPTIONAL INPUTS:

	None
	
 KEYWORD PARAMETERS:

	NO_SETUP:   If the procedure setup_elements has already been called then
                  the keyword /no_setup should be set to avoid repeating this step

       MIN_ABUND:  If set, calculates the continuum only from those elements which 
                   have an abundance greater than min_abund.  Can speed up the 
                   calculations.  For example:
                   abundance (H)  = 1.
                   abundance (He) = 0.085
                   abundance (C)  = 3.3e-4
                   abundance (Si) = 3.3e-5
                   abundance (Fe) = 3.9e-5


 OUTPUTS:

	Intensity:  free-free continuum intensity in 10^-40 erg cm^3 s^-1 str^-1 angstrom^-1 per
                   unit emission measure int(n^2 dh) in cm^-5


 COMMON BLOCKS:

	common elements,abund,abund_ref,ioneq,ioneq_t,ioneq_ref


 EXAMPLE:

             > freefree,1.e+6,wvl,int
             > freefree,1.e+6,wvl,int,min_abund=3.e-5
             > freefree,1.e+6,wvl,int,/no_setup,min_abund=1.e-6

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1999:     Version 2.0
       September 1999:  Version 3.0

(See freefree.pro)


GOFNT

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	GOFNT

 PURPOSE:

	calculate G(n,T) function (line intensity per unit emission measure)
       

 CATEGORY:

	spectral diagnostics

 CALLING SEQUENCE: 

	GOFNT,Ion,Wmin,Wmax,Temperature,G,Desc


 INPUTS:

       Ion:   the CHIANTI style name of the ion, i.e., 'c_5' for C V
       Wmin:  minimum of wavelength wavelength range of interest in Angstroms
       Wmax:  maximum of wavelength wavelength range of interest

 OPTIONAL INPUTS:

	Must specify line to form numerator and denominator
       Multiple lines can be selected and summed
	
 KEYWORD PARAMETERS:


	/PRESSURE:  specifies the pressure in units of NeT (cm^-3 K).  G is then
                  calculated at that constant pressure 
		
	/DENSITY:  specifies the electron density in units of cm^-3.  G is then 
                 calculated at that value of the electron density.  If neither the 
                 density or pressure keywords are specified, a constant
                  density of 1.e+10 cm^-3 is assumed

       /PHOTONS:  sets output in photons/s

        /OUTFILE:  the (optional) name of the output ascii file where a 
                   listing of the line ratio intensity as a function of 
                   temperature is saved.

        /PSFILE:  the (optional) name of the output postscript file 
                  where a plot of the choses temperature sensitive line
                  ratio is saved.

 OUTPUTS:

	Temperature:  an array of temperatures 
       G:  Intensity (erg cm^-2 s^-1 str-1) per emission measure (N_e*N_H*dh cm^-5)
           G=(hc/lambda_ij)*A_ji*(N_j(X^+m)/N(X^+m))*(N(X^+m)/N(X))*(N(X)/N(H))
           G=A_ji*(N_j(X^+m)/N(X^+m))*(N(X^+m)/N(X))*(N(X)/N(H)) if /PHOTONS is set
       Desc:  a short string description of the selected line


 OPTIONAL OUTPUTS:

	Plots intensity ratios



 EXAMPLE:

      > gofnt,'o_5',1000.,1500.,temp,goft,desc,density=1.e+16

      by selecting 9 the G(N,T) function for the O V 1371A line is calculated


  

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	October 4, 1996:     Version 1

(See gofnt.pro)


ION2FILENAME

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	ion2filename

 PURPOSE:
	Ion names as character strings are converted to
	provide their complete file name (with out suffix)

 CATEGORY:
	
	naming utility

 CALLING SEQUENCE:

       ION@FILENAME,Ion,Filename


 INPUTS:
	Name:   such as 'c_2'


 OUTPUTS:

	Filename:  !xuvtop/c/c_2



 EXAMPLE:

                     > ion2filename,'c_2d',filename
                     > print,filename
                     > !xuvtop/c/c_2d/c_2

 MODIFICATION HISTORY:

 	Written by:	Ken Dere
	September 1999:  added for use with Version 3

(See ion2filename.pro)


ION2SPECTROSCOPIC

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	ION2SPECTROSCOPIC

 PURPOSE:


	provide identification strings

 CATEGORY:

	database.

 CALLING SEQUENCE:

       ION2SPECTROSCOPIC, Ion, Spectroscopic


 INPUTS:

       Ion:   CHIANTI notation for an ion, i.e., 'c_2' for C II	


 OUTPUTS:

	Name:  the spectroscopic notation for the ion, i.e. 'C II'



 EXAMPLE:

             > ion2spectroscopic,'fe_13',name
             > print,name
             > Fe XIII   

 MODIFICATION HISTORY:
 	Written by:	    Ken Dere
	September 1999:     Version 3.0

(See ion2spectroscopic.pro)


ISOTHERMAL

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	isothermal

 PURPOSE:

       calculates an isothermal synthetic spectrum 

 CATEGORY:
	
	synthetic spectra

 CALLING SEQUENCE:

       isothermal,Wmin,Wmax,wavestep,temp,Lambda,Spectrum,
          List_wvl,List_ident,[/photons],[/ergs],[edensity=edensity]
          [pressure=pressure],[/noverbose],[sngl_ion=sngl_ion]
          [min_abund=min_abund],[/no_setup],[/cont],[masterlist=masterlist]

 INPUTS:

	Wmin:  minimum of desired wavelength range in Angstroms
	Wmax:  maximum of desired wavelength range in Angstroms
       Wavestep: wavelength grid for output line spectrum
       Temp: electron temperature (or array)

  KEYWORDS:

       Specify one of below:
          Edensity: electron density in emitting region (cm^-3)
          Pressure: electron pressure (cm^-3 K)
          Note- these can be single valued or arrays corresponding to 
             the specified temperatures
       Photons: outputs units in photons cm^3 s^-1 str^-1 (default)
       Ergs: outputs units in ergs cm^3 s^-1 str^-1
       Noverbose: turn off printing of information
	Sngl_ion:  specified a single ion to be used instead of the complete
                  set of ions specified in !xuvtop/masterlist/masterlist.ions
                  e.g. sngl_io='fe_15' for Fe XV

       MIN_ABUND:  If set, calculates the continuum only from those elements which 
                   have an abundance greater than min_abund.  Can speed up the 
                   calculations.  For example, from Allen (1973):
                   abundance (H)  = 1.
                   abundance (He) = 0.085
                   abundance (C)  = 3.3e-4
                   abundance (O)  = 6.6e-4
                   abundance (Si) = 3.3e-5
                   abundance (Fe) = 3.9e-5

       CONT:      if set, then the continuum (free-free and free-bound) is included


       MASTERLIST:  string of a specific masterlist file or set to '' to select a 
                particular masterlist file.  Otherwise, masterlist.ions is used



 OUTPUTS:

       Lambda:  wavelength array of calculated synthetic spectrum
       Spectrum:  intensity array (erg or photons cm^-2 s^-1 str^-1)
       List_wvl:  a list of wavelengths for use with synthetic_plot.pro
       List_ident:  a list of line identifications for use with 
                        synthetic_plot.pro

 PROCEDURE:

	the user will be asked to select an abundance file and a 
       ionization equilibrium file. For each ion in the masterlist
       the level inof, waves, gf, A values, and observed and theoretical
       energy levels are read in.  The level populations for each input
       temperature/density are calculated. The Flux is then computed
       for each line in selected wavelegth range. The flux is returned
       either in photons cm^+3 s^-1 str^-1 (default) or 
       ergs cm^+3 s^-1 str^-1

 EXAMPLE:

       > isothermal,100.,200.,.1,[1.e6,1.5e6],lambda,spectrum,
           list_wvl,list_ident,edensity=1.e9,/photons

 MODIFICATION HISTORY:
 	Written by:	Jeff Newmark  1996 October 24
                       (derived from synthetic.pro: Dere, May 1996)
       Modified by:    Ken Dere      1997 April 25
                         to fit into CHIANTI
       Modified by:    Ken Dere      1999 September 1
                         for Version 3.0, and added continuum

(See isothermal.pro)


LANDSCAPE

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	LANDSCAPE

 PURPOSE:

	:


 CALLING SEQUENCE:

       LANDSCAPE


 INPUTS:

	None	

	
 KEYWORD PARAMETERS:

	None

 OUTPUTS:

	None



 COMMON BLOCKS:

	None


 EXAMPLE:

    to make a postscript file in landscape orientation

             > set_plot,'ps'
             > landscape
             > plot,x,y
             > device,/close
             > set_plot,'x'

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See landscape.pro)


LATEX_WVL_DEM

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).



 NAME:
	LATEX_WVL_DEM

 PURPOSE:

	create a latex file of predicted spectral line intensities and
       wavelengths corresponding to a selected abundance and differential
       emission measure (DEM)

 CATEGORY:

	science.

 CALLING SEQUENCE:

       LATEX_WVL_DEM, Wmin, Wmax, Pressure


 INPUTS:

	Wmin:   lower limit of the wavelength/energy range of interest (Angstroms)
               if kev keyword set, then wmin is in kev	
	Wmax:   upper limit of the wavelength/energy range of interest (Angstroms)
               if kev keyword set, then wmax is in kev	
       Pressure:  electron density (cm-3) * temperature (K), assumed constant	

 OPTIONAL INPUTS:

	Elemental abundance file:  selected with widget
       Ionization equilibrium file:  selected with widget
       Differential emission measure file:  selected with widget
	
 KEYWORD PARAMETERS:

	MINI:	Minimum intensity for line to be included in output

	SNGL_ION:  specified a single ion to be used instead of the complete
                  set of ions specified in !xuvtop/masterlist/masterlist.ions

       PHOTONS:  units will be in photons rather than ergs

       KEV:  wavelengths will be given in kev rather than Angstroms


       MASTERLIST:  string of a specific masterlist file or set to '' to select a 
                particular masterlist file.  Otherwise, masterlist.ions is used

 OUTPUTS:

	a latex file:  linelist.tex in the user's home directory (~)



 COMMON BLOCKS:

	common elvlc,l1a,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,eref
       common wgfa, wvl,gf,a_value
       common upsilon,t_type,deu,c_ups,splups
       common elements,abund,abund_ref,ioneq,ioneq_t,ioneq_ref,ionpot,ip_ref


 SIDE EFFECTS:

	Some of the ions have 100+ energy levels and the inversion of the
       necessary matrices can be time consuming


 EXAMPLE:

             > latex_wvl_dem,100.,200.,1.e+15,mini=10.,sngl_ion='c_2'

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       September 1996:   modified to work with VMS
       September 1998:  Ken Dere added kev keyword
       December 1998:  Modified for use with CHIANTI database version 3.0  
       April 2000:  uses latex longtable style

(See latex_wvl_dem.pro)


PLOT_POPULATIONS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	PLOT_POPULATIONS

 PURPOSE:

	plot the population of a number of the lowest levels as a function of 
       electron density for a specific temperature

 CATEGORY:

	science.

 CALLING SEQUENCE:

       PLOT_POPULATIONS,Ion,T,Nlevels


 INPUTS:

       Ion:  CHIANTI style name for the ion, i.e., 'c_6' for C VI
       T:  electron temperature (K)
       Nlevels:  the number of levels for which populations are plotted
                 starts from level 1 (the ground level)

	
 KEYWORD PARAMETERS:

	OUTFILE:   the (optional) name of the output file where the listing 
                  is produced
	PSFILE:    the (optional) name of the output file where a postscript 
                  plot produced


 OUTPUTS:


 COMMON BLOCKS:

	common elvlc,l1a,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,eref
       common wgfa, wvl,gf,a_value
       common upsilon,t_type,c_ups,splups



 PROCEDURE:


 EXAMPLE:

 to plot populations of the 5 ground configuration levels of Fe XIII
 and store these values in a file 'Fe_XIII.lis' for a temperature of 1.5 MK

             > plot_populations,'fe_13',1.5e+6,5,outfile='Fe_XIII.lis'

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       November 1997:  Ken Dere, added psfile keyword
       September 1999:  Ken Dere, for Version 3, 

(See plot_populations.pro)


POPULATE

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	POPULATE

 PURPOSE:

	calculate levels populations at a specific temperature and electron
       density

 CALLING SEQUENCE:

       POPULATE,Temperature, ElectronDensity, Population


 INPUTS:

	T:   electron temperature
       Eden:  electron density (cm^(-3) )	

	

 OUTPUTS:

	Pop:  populations of all of the ion's levels
       



 COMMON BLOCKS:

      common elvlc,l1a,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,eref
      common wgfa, wvl,gf,a_value
      common upsilon,t_type,deu,c_ups,splups,ip

        these must be filled with the necessary data before 
        populate can be run


 RESTRICTIONS:

	see above

 PROCEDURE:

	this is not a top level routine.

 EXAMPLE:



 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       Revised Nov 1996 by Ken Dere following suggestion of Vinay Kashyap 
       and Jeremy Drake to make arrays c,d,b,pop double precision to avoid 
       overflows
       December 1998:  Includes ionizationn potential for excitation
                       by dielectronic recombination (Ken Dere)


(See populate.pro)


RAD_LOSS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

 NAME:
	RAD_LOSS

 PURPOSE:

       calculates energy loss rate by free-free (ff), radiative recombination (fb) and 
       by line (bound-bound) radiation

 CATEGORY:
	
	synthetic spectra

 CALLING SEQUENCE:

       RAD_LOSS,Temperature,Loss_rate


 INPUTS:

	None:  the user will select various parameters such as the 
              choice of elemental abundances and ionization equilibria

  KEYWORDS:

       Pressure:  pressure in emitting region (cm^-3 K)
                  density=pressure/temperature(K)
       Density:   density (cm^-3), constant for all temperatures
                  if neither density or pressure is set, then a default constant density
                  of 10x10^10 cm^-3 is used.


 OUTPUTS:

       Temperature:  array of temperatures (K)
       Loss_rate:  energy loss rate in erg cm^-3 s^-1


 PROCEDURE:


  if keyword pressure is set then calculations performed at constant pressure
  if keyword density is set then calculations performed at constant density
  otherwise, density is set to 1.e+10
  
  pressure = density * temperature  (cm^-3 K)


	the user will be asked to select an abundance file and a 
       differention emission measure (DEM) file.

 EXAMPLE:

       > rad_loss,t,r


 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	January 1999:  version 1, adopted from synthetic.pro

(See rad_loss.pro)


READ_ABUND

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_ABUND

 PURPOSE:

	to read CHIANTI abundance files

 CATEGORY:

	science.

 CALLING SEQUENCE:

       READ_ABUND,File,Abundance,Reference


 INPUTS:

	File:  the name (string) of the file containing the abundance values
                (relative to hydrogen) usually of the form 
                 '!xuvtop/abundance/*.abund'


	

 OUTPUTS:

	Abundance:  an array of abuncance values
       Reference:  a string containing the reference to the chosen set
                   of abundances in the scientific literature



 PROCEDURE:

	You can describe the foobar superfloatation method being used here.

 EXAMPLE:

             > read_abund,'allen.abund',abundance,ref
               abundance(26) = abundance of iron relative to hydrogen
               quoted by C.W. Allen in Astrophysical Quantities

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See read_abund.pro)


READ_DEM

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_DEM

 PURPOSE:

	to read values the differential emission measure as a function 
       of temperature

 CATEGORY:

	science.

 CALLING SEQUENCE:

       READ_DEM, File, T, Dem, Ref


 INPUTS:

	File:  the name of the file containing the DEM values, usually in
               !xuvtop/dem/*.dem	


 OUTPUTS:

	T:  Log10 values of temperature (K)
       Dem:  Log10 values of the differential emission measure
       Ref:  the reference to the DEM values in the scientific literature


 OPTIONAL OUTPUTS:

	Describe optional outputs here.  If the routine doesn't have any, 
	just delete this section.



 EXAMPLE:

             > read_dem,!xuvtop+'/dem/active_region.dem',t,dem,ref

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See read_dem.pro)


READ_ELVLC

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       astrophysical emission line spectra.  It is a collaborative project
       involving Ken Dere (Naval Research Laboratory, Washington DC), 
       Brunella Monsignori-Fossi and Enrico Landi (Arcetri Observatory, 
       Florence), and Helen Mason and Peter Young (DAMTP, Cambridge Univ.).


 NAME:
	READ_ELVLC

 PURPOSE:

	to read files containing observed and theoretical energy levels

 CATEGORY:

	science.

 CALLING SEQUENCE:

       READ_ELVLC, File, L1, Term, Conf, ss, ll, jj, Ecm, Eryd, Ecmth, Erydth, Ref


 INPUTS:

	File:	the name of the file 
               i.e., !xuvtop+'/si/si_12/si_12.elvlc' for Si XII

 OPTIONAL INPUTS:

	None:
	

 OUTPUTS:       L1      - level index
                Term    - configuration index
                Conf    - configuration description
                ss      - 2S+1
                ll      - L
                jj      - J
                Ecm     - observed energy (cm^-1)
                Eryd    - observed energy (Rydbergs)
                Ecmth   - theoretical energy (cm^-1)
                Erydth  - theoretical energy (Rydbergs)
                Ref     - reference
               
   note:  the theoretical energies are usually those used in the scattering
          calculation and are only useful for predicting approximate wavelengths


 EXAMPLE:

             > file = !xuvtop+'/si/si_12/si_12.elvlc'
             > read_elvlc,file,l1,term,conf,ss,ll,jj,ecm,eryd,ref
             > 

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See read_elvlc.pro)


READ_ELVLC_DIRECT

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_ELVLC_DIRECT

 PURPOSE:

	to read files containing observed energy levels
       does not reformat some variables like READ_ELVL

 CATEGORY:

	science.

 CALLING SEQUENCE:

       READ_ELVLC_DIRECT, File, L1, Term, Conf, ss, ll, spd, jj, Ecm, Eryd, Ecmth, Erydth, Ref


 INPUTS:

	File:	the name of the file 
               i.e., !xuvtop+'/si/si_12/si_12.elvl' for Si XII

 OPTIONAL INPUTS:

	None:
	

 OUTPUTS:       L1    - level index
                Term  - configuration index
                Conf  - configuration description
                ss    - 2S+1
                ll    - L
                spd   - 'S', 'P', etc to denote L value
                jj    - J
                Mult  - multiplicity  2J+1
                Ecm   - energy (cm^-1)
                Eryd  - energy (Rydbergs)
                Ecmth - energy (cm^-1)
                Erydth- energy (Rydbergs)
                Ref   - reference
               




 EXAMPLE:

             > file = !xuvtop+'/si/si_12/si_12.elvl'
             > read_elvlc_direct,file,l1,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,ref
             > 

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See read_elvlc_direct.pro)


READ_GFFINT[1]

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	READ_GFFINT

 PURPOSE:

	Read gffint file containing integrated free-free gaunt factors of 
             R. S. Sutherland, 1998, MNRAS, 300, 321


 CALLING SEQUENCE:

       READ_GFFINT,g2,gff,s1,s2,s3


 INPUTS:

	None	

	

 OUTPUTS:

	g2,gff,s1,s2,s3 defined in the paper by Sutherland




 COMMON BLOCKS:

	None



 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	April 2000:     Version 3.0

(See read_gffint.pro)


READ_GFFINT[2]

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	READ_GFFINT

 PURPOSE:

	Read gffgu.dat file containing free-free gaunt factors of 
             R. S. Sutherland, 1998, MNRAS, 300, 321


 CALLING SEQUENCE:

       READ_GFFGU,g2,u,gff


 INPUTS:

	None	

	

 OUTPUTS:

	g2,u,gff defined in the paper by Sutherland




 COMMON BLOCKS:

	None



 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	April 2000:     Version 3.0

(See read_gffgu.pro)


READ_IONEQ

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       astrophysical emission line spectra.  It is a collaborative project
       involving the Naval Research Laboratory, Washington DC, Arcetri 
       Observatory, Florence, Cambridge University, Rutherford
       Appleton Laboratory, and the University of Central Lancashire.


 NAME:
	READ_IONEQ

 PURPOSE:

	to read files containing the ionization equilibrium values

 CATEGORY:

	science.

 CALLING SEQUENCE:

       READ_IONEQ, File, T, Ioneq, Ref


 INPUTS:

	File:	for example, !xuvtop+'/ioneq/arnaud_rothenflug.ioneq'

 OPTIONAL INPUTS:

	None:
	

 OUTPUTS:

	T:  array of log10 temperatures
       Ioneq: 2 dimensional array of ionization equilibrium values
       Ref:  reference in the scientific literature


 EXAMPLE:

             > read_ioneq,!xuvtop+'/ioneq/arnaud_rothenflug.ioneq'
             > help,t,ioneq
             > T               FLOAT     = Array(41)
             > IONEQ           FLOAT     = Array(41, 28, 29)
             > print, minmax(t)
             >  4.00000      8.00000
             > print,t(20)
             >  6.0000
             > print,ioneq(20,25,9)
             >   0.269                  = log10 of ionization equilibrium of Fe X

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       March 1999:     KPD to read both number of temperature and number 
                       of elements

(See read_ioneq.pro)


READ_IP

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_IP

 PURPOSE:

	to read values of ionization potentials 


 CALLING SEQUENCE:

       READ_IP, File, IP, Ref


 INPUTS:

	File:  the name of the file containing the IP values, usually
               !xuvtop/ip/chianti.ip	


 OUTPUTS:

	IP:  Array values of ionization potential (cm^-1)
       Ref:  the reference to the IP values in the scientific literature





 EXAMPLE:

             > read_ip,!xuvtop+'/ip/chianti.ip',ip,ref
                  ip(2-1,2-1) give the ionization potential of He II  (Z=2, Ion=2)

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1998:     Version 1.0

(See read_ip.pro)


READ_MASTERLIST

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_MASTERLIST

 PURPOSE:

	read the masterlist.ions types of file and output a list of ions

 CATEGORY:

	science.

 CALLING SEQUENCE:

       READ_MASTERLIST,filename,list


 INPUTS:

	filename:   name of the masterlist file
	

	
 KEYWORD PARAMETERS:

	none

 OUTPUTS:

	list:  list of ions



 COMMON BLOCKS:

	none;


 EXAMPLE:

             > read_masterlist,'!xuvtop/masterlist.masterlist.ions',list

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	December 1998:  first version  

(See read_masterlist.pro)


READ_SPLUPS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_SPLUPS

 PURPOSE:

	to read file containing spline fits to the Burgess-Tully scaled
       collision strengths

 CATEGORY:

	science.

 CALLING SEQUENCE:

       READ_SPLUPS, File, T_type, Gf, De, C_ups, Splups, Ref


 INPUTS:

	File:	the name of the input file, i.e. !xuvtop/si/si_4/si_4.splups


 OUTPUTS:

	T_type:  a 2 dimensional array contain values of the transition type (1-4)
       Gf:  a 2 dimensional array containing values of the weighted oscillator
             strengths gf
       De:  energy difference between levels in Rydbergs
       C_ups:  a 2 dimensional array containing values of the Burgess and Tully
             scaling parameter c
       Splups:  spline fits to the scaled Upsilons
       Ref:  reference to the source of the collision strength calculations





 PROCEDURE:

	see Burgess and Tully, 1992, Astronomy and Astrophysics, 254, 436.

 EXAMPLE:

             > read_splups, !xuvtop+'/si/si_4/si_4.splups',t_type,gf,de,c_ups,splups,ref

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See read_splups.pro)


READ_WGFA

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_WGFA

 PURPOSE:

	:

 CATEGORY:

	science

 CALLING SEQUENCE:

       READ_WGFA, File, Lvl1, Lvl2, Wvl, Gf, A_value, Ref


 INPUTS:

	File:  name of the file containing the radiative data
                i.e. !xuvtop/c/c_4/c_4.wgfa


 OUTPUTS:

	Lvl1:  1D array of indices of the lower level (starting at 1)
       Lvl2:  1D array of indices of the upper level (starting at 1)
       Wvl:   2D array of transition wavelengths in Angstroms
       Gf:    2D array of weighted oscillator strength gf
       A_value:  2D array of radiative transition probability (s^-1)
       Ref:   1D string array of references to the data in the scientific literature



 EXAMPLE:

             > read_wgfa,!xuvtop+'/c/c_4/c_4.wgfa',lvl1,lvl2,wvl,gf,a,ref
             

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See read_wgfa.pro)


READ_WGFA2

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	READ_WGFA2

 PURPOSE:

	read radiative data files
         a modified version of read_wgfa
         needed to take account of two types of transitions between the same 2 levels:
         for example, the M1 and the 2 photon E1 transition 1s-2s in hydrogenic ions


 CATEGORY:

	science

 CALLING SEQUENCE:

       READ_WGFA2, File, Lvl1, Lvl2, Wvl, Gf, A_value, Ref


 INPUTS:

	File:  name of the file containing the radiative data
                i.e. !xuvtop/c/c_4/c_4.wgfa


 OUTPUTS:

	Lvl1:  1D array of indices of the lower level (starting at 1)
       Lvl2:  1D array of indices of the upper level (starting at 1)
       Wvl:   1D array of transition wavelengths in Angstroms
       Gf:    1D array of weighted oscillator strength gf
       A_value:  1D array of the total radiative transition probability (s^-1)
       Ref:   1D string array of references to the data in the scientific literature



 EXAMPLE:

             > read_wgfa2,!xuvtop+'/c/c_4/c_4.wgfa',lvl1,lvl2,wvl,gf,a,ref
             

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See read_wgfa2.pro)


SETUP_ELEMENTS

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	SETUP_ELEMENTS


 PURPOSE:  read in ionization equilibrium and abundances
           not for general user use


 CALLING SEQUENCE:

       SETUP_ELEMENTS


 INPUTS:

	None	



 OUTPUTS:  reads data into common block





 COMMON BLOCKS:

	common elements,abund,abund_ref,ioneq,ioneq_t,ioneq_ref



 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	Feb.  2000:     Version 1.0 for CHIANTI version 3

(See setup_elements.pro)


SETUP_ION

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).

 NAME:
	SETUP_ION

 PURPOSE:

	:  set up the atomic data to calculate level populations


 CALLING SEQUENCE:

       SETUP_ION,Ion,Wvlmin,Wvlmax,Wvltst,Lvl1,Lvl2,Wvl1,Gf1,A_value1


 INPUTS:

	Ion:  string specifying ion, i.e., 'c_2'
       Wvlmin:  minimum wavelength of interest (Angstroms)
       Wvlmax:  maximum wavelength of interest (Angstroms)
       

	

 OUTPUTS:

	Wvltst:  true of there are spectral lines between wvlmin and wvlmax
       Lvl1:  number of final level of transition
       Lvl2:  number of initial level of transition
       Wvl1:  wavelenths of spectral lines formed by this ion (Angstroms)
       Gf1:  oscillator strength
       A_value1:  radiative transition probability 



 COMMON BLOCKS:

	common elvlc,l1a,term,conf,ss,ll,jj,ecm,eryd,ecmth,erydth,eref
       common wgfa, wvl,gf,a_value
       common upsilon,t_type,deu,c_ups,splups


 EXAMPLE:

             > setup_ion,'c_2',1000.,1500.,wvltst,Lvl1,Lvl2,Wvl1,Gf1,A_value1
             > print,wvltst
             >    1

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	September 1999:     Version 3.0

(See setup_ion.pro)


SYNTHETIC

[Previous Routine] [Next Routine] [List of Routines]


 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	synthetic

 PURPOSE:

       calculates a synthetic spectrum

 CATEGORY:
	
	synthetic spectra

 CALLING SEQUENCE:

       SYNTHETIC,Wmin, Wmax, Fwhm, Pressure, Lambda, Spectrum ,List_wvl, List_ident
                 ,[/all, density=, /cont, min_abund=]


 INPUTS:

	Wmin:  minimum of desired wavelength range in Angstroms
	Wmax:  maximum of desired wavelength range in Angstroms
       Fwhm:  gaussian full width at half maximum of the resolution of the output 
                  spectrum, for example, to correspond to an observed spectrum
       Pressure:  pressure in emitting region (cm^-3 K)

  KEYWORDS:

       DENSITY:   density (cm^-3), constant for all temperatures
                  over-rides the pressure value
     
	ALL:  if set, then all lines are included.  This means that lines for which
             only an approximate wavelength is known, denoted by a negative 
             wavelength value in the .wgfa file, are included.

	SNGL_ION:  to calculate synthetic spectrum for a single ion

       NO_CONT:   if set, then the continuum (free-free and free-bound) are not included

       MIN_ABUND:  If set, calculates the continuum only from those elements which 
                   have an abundance greater than min_abund.  Can speed up the 
                   calculations.  For example, from Allen (1973):
                   abundance (H)  = 1.
                   abundance (He) = 0.085
                   abundance (C)  = 3.3e-4
                   abundance (O)  = 6.6e-4
                   abundance (Si) = 3.3e-5
                   abundance (Fe) = 3.9e-5


       MASTERLIST:  string of a specific masterlist file or set to '' to select a 
                particular masterlist file.  Otherwise, masterlist.ions is used



 OUTPUTS:

       Lambda:  wavelength array of calculated synthetic spectrum
       Spectrum:  intensity array (erg cm^-2 s^-1 str^-1 Ang^-1),
                  unless keyword photons is set then output is is
                  photons cm^-2 s^-1 str^-1 Ang^-1
       List_wvl:  a list of wavelengths for use with synthetic_plot.pro
       List_ident:  a list of line identifications for use with 
                        synthetic_plot.pro


 PROCEDURE:


  calculations normally performed at constant pressure
  if keyword density is set then calculations performed at constant density
  
  pressure = density * temperature  (cm^-3 K)


	the user will be asked to select an abundance file and a 
       differention emission measure (DEM) file.

 EXAMPLE:

       > synthetic,100.,200.,.1,1.e+16,lambda,spectrum,list_wvl,list_ident


 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	May 1996:     Version 2.0
       Sept 1996:     modified to work with VMS, Ken Dere
       July 1997:    Corrected value of dlnt:  Ken Dere
       May 1998:     Added 'pressure' and 'density' keywords
       Dec. 1998:    Modified to include dielectronic lines, sngl_ion keyword

(See synthetic.pro)


SYNTHETIC_PLOT

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

 NAME:
	synthetic_plot

 PURPOSE:

       to plot out synthetic spectra calculated with Synthetic
       and interactively identify spectral lines


 CATEGORY:
	
	spectroscopy

 CALLING SEQUENCE:

       SYNTHETIC_PLOT,Wvl,Spectrum,List_wvl,List_ident,fwhm


 INPUTS:

       Wvl:  wavelength array from synthetic
       Spectrum:  spectrum intensity array from synthetic
       List_wvl:  string array of spectral line wavelengths
       List_ident:  string array of spectral line identifications
       Fwhm:  when the cursor is clicked, spectral lines with fwhm
              (Angstroms) of the cursor are printed out


 KEYWORDS

	xrange:  similar to IDL keyword to determine wavelength range of plot

 OUTPUTS:

       None


 PROCEDURE:

	Click the left mouse button to select a wavelength
       Click the right mouse button to exit

 EXAMPLE:

      > synthetic,100.,200.,.1,1.e+15,wvl,spectrum,list_wvl,list_ident
      > synthetic_plot,wvl,spectrum,list_wvl,list_ident,0.1
                     
      note:  it is not necessary for the two fwhm values to be the same      

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	May 1996:     Version 2.0
       Dec. 1998:    revised by Ken Dere

(See synthetic_plot.pro)


TEMPERATURE_RATIOS

[Previous Routine] [Next Routine] [List of Routines]


 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	TEMPERATURE_RATIOS

 PURPOSE:

	calculate and display temperature sensitivity of line intensity ratios

 CATEGORY:

	spectral diagnostics

 CALLING SEQUENCE:

       TEMPERATURE_RATIOS,Ion,Wmin,Wmax,Tempmin,Tempmax,Temperature,Ratio,Desc


 INPUTS:

       Ion:   the CHIANTI style name of the ion, i.e., 'c_5' for C V
       Wmin:  minimum of wavelength wavelength range of interest in Angstroms
       Wmax:  maximum of wavelength wavelength range of interest
       Tempmin:  log10 of lowest temperature of interest, i.e. 4 for 10.^4 K
       Tempmax:  log10 of highest temperature of interest

 OPTIONAL INPUTS:

	Must specify indices of lines which are to form the ratio
	
 KEYWORD PARAMETERS:

	PRESSURE:  calculates the intensity ratios for constant pressure
		
	DENSITY:  calculates the intensity ratios for constant density
                  density = electron density * temperature (cm^-3 K)
                  if neither density or pressure are specified, a constant
                  density of 1.e+10 cm^-3 is assumed

        /OUTFILE:  the (optional) name of the output ascii file where a 
                   listing of the line ratio intensity as a function of 
                   temperature is saved.

        /PSFILE:  the (optional) name of the output postscript file 
                  where a plot of the choses temperature sensitive line
                  ratio is saved.

 OUTPUTS:

	Temperature:  an array of temperatures spanning Tempmin to Tempmax
       Ratio:  an array of the intensity ratio of the selected lines
       Desc:  a short string description of the selected line ratio


 OPTIONAL OUTPUTS:

	Plots intensity ratios



 EXAMPLE:

      > temperature_ratios,'ne_5',1000.,1500.,4.,6.,temperature,ratio,desc,density=1.e+16

  by typing 9,1 the 1371/1218 line ratio is calculated

      > print,desc
      O  V    1371.294/1218.393

  

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	May 1996:     Version 2.0

(See temperature_ratios.pro)


Z2ELEMENT

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	Z2ELEMENT

 PURPOSE:


	provide identification strings

 CATEGORY:

	database.

 CALLING SEQUENCE:

       Z2ELEMENT, Iz, Name


 INPUTS:

	Iz:  nuclear charge of ion of interest, i.e. 26 for Fe


 OUTPUTS:

	Name:  a string identifying the element



 EXAMPLE:

             > z2element,2,name
             > print,name
             > He  

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See z2element.pro)


ZION2FILENAME

[Previous Routine] [Next Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	ZION2FILENAME

 PURPOSE:

	help locate CHIANTI database files

 CATEGORY:

	database.

 CALLING SEQUENCE:

       ZION2FILENAME, Iz, Ion, Filename


 INPUTS:

	Iz:  nuclear charge of ion of interest, i.e. 26 for Fe
       Ion:   charge state of ion of interest, i.e. 2 for Fe II	

  KEYWORDS:
       
       diel:  set if excitation of this ion is by dielectronic
		recombination

 OUTPUTS:

	Filename:  the complete filename and path specification for generic
                  CHIANTI database file, i.e. '.elvlc' suffix is not included


 RESTRICTIONS:

	!xuvtop must be set


 EXAMPLE:

             > zion2filename,26,2,filename
             > print,filename
             > /data1/xuv/fe/fe_2   assuming !xuvtop = '/data1/xuv'

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0
       Sept  1996:     Modified for use with VMS
       December 1998:  Modified to diel keyword

(See zion2filename.pro)


ZION2SPECTROSCOPIC

[Previous Routine] [List of Routines]

 PROJECT:  CHIANTI

       CHIANTI is an atomic database package for the calculation of
       continuum and emission line spectra from astrophysical plasmas. It is a 
       collaborative project involving the Naval Research Laboratory
       (Washington DC, USA), the Arcetri Observatory (Firenze, Italy), and the
       Cambridge University (United Kingdom).


 NAME:
	ZION2SPECTROSCOPIC

 PURPOSE:


	provide identification strings

 CATEGORY:

	database.

 CALLING SEQUENCE:

       ZION2SPECTROSCOPIC, Iz, Ion, Name


 INPUTS:

	Iz:  nuclear charge of ion of interest, i.e. 26 for Fe
       Ion:   charge state of ion of interest, i.e. 2 for Fe II	


 OUTPUTS:

	Name:  the spectroscopic notation for the ion, i.e. 'Fe II'



 EXAMPLE:

             > zion2spectroscopic,26,2,name
             > print,name
             > Fe II   

 MODIFICATION HISTORY:
 	Written by:	Ken Dere
	March 1996:     Version 2.0

(See zion2spectroscopic.pro)