G_OF_T $SSW/packages/chianti/idl/extra/g_of_t.pro
[Previous] [Next]

 PROJECT:  CHIANTI

       CHIANTI is an Atomic Database Package for Spectroscopic Diagnostics of
       Astrophysical Plasmas. It is a collaborative project involving the Naval
       Research Laboratory (USA), the University of Florence (Italy), the
       University of Cambridge and the Rutherford Appleton Laboratory (UK). 


 NAME: G_OF_T()
       
 PURPOSE:

	To compute DE * F(T) * n_j * A_ji / N_e for selected emission lines. 
	Option to also multiply by abundance.

 CATEGORY:

       Atomic data analysis

 EXPLANATION:

	The G-of-T function has a number of different definitions in the 
	literature. In the most basic form it contains only the temperature 
	dependent parts (i.e., 0.83*n_j*A_ji*F(T)/N_e), but often a Delta-E 
	and Ab(X) are added as well. Here, the _default_ form is:

	Delta-E * 0.83 * n_j * A_ji * F(T) / N_e

	By using the NO_DE keyword, the Delta-E can be omitted, while the 
	ABUND keyword allows the abundance to be added.

	The function that is output is tabulated over 4.0 <= logT <= 8.0 
	in 0.1 dex intervals. If you want the function tabulated over 
	smaller intervals, run the ION_INTERP routine afterwards.

 CALLING SEQUENCE:


 EXAMPLES:

	RESULT=G_OF_T(26,13)

	RESULT=G_OF_T(26,13,DENS=7)

	RESULT=G_OF_T(26,13,GOFTFILE='my_gofts.dat')

       RESULT=G_OF_T(26,13,/ABUND)

       RESULT=G_OF_T(26,13,ABUND_FILE=ABUND_FILE, IONEQ_FILE=IONEQ_FILE)

 INPUTS:

	IZ:	The atomic number of the ion (e.g., 26 = Fe)

	ION:	The spectroscopic number of the ion (e.g., 12 = XII)

 OPTIONAL INPUTS:

	DENS:	The logarithm (to base 10) of the density at which the 
		emissivities are calculated (default=10.)

	WRANGE: Wavelength range from which lines are required. If not 
		specified, then the 10 strongest lines are displayed.

	PATH:	If specified, the routine will look for the atomic data in 
		the PATH directory, rather than in the CHIANTI database

	GOFTFILE:	By specifying GOFTFILE as a filename, the G-of-T 
			function can be stored in this file. It is stored 
		in the form a structure (called goft_list) with the following 
		labels:

	  goft_list.label: user-specified string, e.g., 'Si XII  520.7'
	  goft_list.func:	 fltarr(41), the G-of-T function

	If the same GOFTFILE is specified for another ion, then the 
	G-of-T function is added to the existing structure. The GOFTFILE 
	option only works when the ABUND keyword is set. The GOFTFILE is 
	meant to be read by another routine called GOFT_PLOTTER.

	INDEX:	Allows the direct specification of indices within the 
		emiss structure. This allows the g_of_t routine to be 
		run without the menu widget appearing. If the /quiet 
		keyword is also used, then the routine will run "silently".

	RADTEMP	Specify background radiation temperature (default: 6000 K)

	RPHOT   Distance from the centre of the star in stellar radius units.
               I.e., RPHOT=1 corresponds to the star's surface. (Default is
               infinity, i.e., no photoexcitation.)

       IONEQ_FILE  Directly specify the name of the ion balance file 
               (including directory path). If not set, then a widget will 
               pop up allowing you to select a file.

       ABUND_FILE  Directly specify the name of the abundance file 
               (including directory path). One can also use /ABUND_FILE 
               to include the abundances in the G(T) function, but allow 
               the abundance file to be picked through a widget.

 KEYWORDS:

       NOPROT  If set, then the default setting will be NOT to use 
               proton rates. This can be changed within the routine.

	NO_DE:	If set, then the output function will *not* contain the 
		Delta-E. Be careful using this if you are using blends 
		(as Delta-E is different for different wavelengths).

	QUIET	If set, then don't plot the G(T) function or print out 
               information to the screen.

 CALLS: ***
	CH_GET_FILE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EMISS_CALC
	READ_ABUND, READ_IONEQ, REVERSE, ZION2SPECTROSCOPIC, concat_dir [4], emiss_select
 RESTRICTIONS:


 HISTORY:

	Ver.1, PRY 28-Jul-97.
	Ver.2, PRY 22-Jun-98, added CHOOSE keyword and removed RAY
	Ver.3, PRY 4-Aug-98, cosmetic changes following comments of Giulio 
			Del Zanna
	Ver.4, PRY 5-Sep-98, added call to choose_ioneq
	Ver.5, PRY 23-Sep-98, added GOFTFILE input
	Ver.6, PRY 3-Mar-99, now calls EMISS_SELECT
       Ver.7, PRY 6-Nov-00, removed the /CHOOSE keyword; also changed 
                       PICKFILE call to DIALOG_PICKFILE and removed call 
                       to the CHIANTI routine ADD\_SUBDIR
       Ver.8, PRY 18-Oct-01, adjusted for proton rates, and 
                       photoexcitation.
       Ver.9, PRY 9-Dec-01, completed modifications for v.4 of CHIANTI.

       V.  10, 21-May-2002, Giulio Del Zanna (GDZ) 
                   generalized directory concatenation to work for
                   Unix, Windows  and VMS.
       Ver. 11, 9-Feb-2005, Peter Young
                   changed keyword_set(abund) to keyword_set(abund_file)

 VERSION     :   11, 9-Feb-2005


GAUSSFIT [1] $SSW/packages/lparl/idl/ucon/morrison/gaussfit2.pro
[Previous] [Next]
 NAME:
	GAUSSFIT

 PURPOSE:
 	Fit the equation y=f(x) where:

 		F(x) = A0*EXP(-z^2/2) + A3 + A4*x + A5*x^2
 			and
		z=(x-A1)/A2

	A0 = height of exp, A1 = center of exp, A2 = sigma (the width).
	A3 = constant term, A4 = linear term, A5 = quadratic term.
 	The parameters A0, A1, A2, A3 are estimated and then CURVEFIT is 
	called.

 CATEGORY:
	?? - fitting

 CALLING SEQUENCE:
	Result = GAUSSFIT(X, Y [, A])

 INPUTS:
	X:	The independent variable.  X must be a vector.
	Y:	The dependent variable.  Y must have the same number of points
		as X.

 OUTPUTS:
	The fitted function is returned.

 OPTIONAL OUTPUT PARAMETERS:
	A:	The coefficients of the fit.  A is a six-element vector as 
		described under PURPOSE.

 CALLS: ***
	CURVEFIT, GAUSSFIT2, GAUSS_FUNCT2 [1], GAUSS_FUNCT2 [2], POLY_FIT
 CALLED BY:
	ADD_SCATTER_DRM, ANAL_BCS_PHA, ANAL_STIMS, AN_NIMCP_1_2, AN_NIMCP_AVG, CAL_SHER
	CDS_LINEFIT_WRAP, DECOMPOSE_BATSE_DRM, DSPEXP, Enorm_drm, FE25_BSC_TEMP, Fitting
	HISTOGAUSS, HXT_BACK, HXT_CAL_FIX [1], HXT_CAL_FIX [2], H_VS_TIME, STOKESFIT
	XSM_PREP, exp_scale min_exp max_exp [1], find_grid, fit_pha
	get_linearity sig e_min e_max, ltc, read_ltc file
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.

 RESTRICTIONS:
	The peak or minimum of the Gaussian must be the largest
	or smallest point in the Y vector.

 PROCEDURE:
	If the (MAX-AVG) of Y is larger than (AVG-MIN) then it is assumed
	that the line is an emission line, otherwise it is assumed there
	is an absorbtion line.  The estimated center is the MAX or MIN
	element.  The height is (MAX-AVG) or (AVG-MIN) respectively.
	The width is found by searching out from the extrema until
	a point is found less than the 1/e value.

 MODIFICATION HISTORY:
	DMS, RSI, Dec, 1983.


GAUSSFIT [2] $SSW/packages/lparl/idl/ucon/morrison/gaussfit3.pro
[Previous] [Next]
 NAME:
	GAUSSFIT

 PURPOSE:
 	Fit the equation y=f(x) where:

 		F(x) = A0*EXP(-z^2/2)
 			and
		z=(x-A1)/A2

	A0 = height of exp, A1 = center of exp, A2 = sigma (the width).
 	The parameters A0, A1, A2, A3 are estimated and then CURVEFIT is 
	called.

 CATEGORY:
	?? - fitting

 CALLING SEQUENCE:
	Result = GAUSSFIT(X, Y [, A])

 INPUTS:
	X:	The independent variable.  X must be a vector.
	Y:	The dependent variable.  Y must have the same number of points
		as X.

 OUTPUTS:
	The fitted function is returned.

 OPTIONAL OUTPUT PARAMETERS:
	A:	The coefficients of the fit.  A is a six-element vector as 
		described under PURPOSE.

 CALLS: ***
	CURVEFIT, GAUSSFIT3, GAUSS_FUNCT3, POLY_FIT
 CALLED BY:
	ADD_SCATTER_DRM, ANAL_BCS_PHA, ANAL_STIMS, AN_NIMCP_1_2, AN_NIMCP_AVG, CAL_SHER
	CDS_LINEFIT_WRAP, DECOMPOSE_BATSE_DRM, DSPEXP, Enorm_drm, FE25_BSC_TEMP, Fitting
	HISTOGAUSS, HXT_BACK, HXT_CAL_FIX [1], HXT_CAL_FIX [2], H_VS_TIME, STOKESFIT
	XSM_PREP, exp_scale min_exp max_exp [1], find_grid, fit_pha
	get_linearity sig e_min e_max, ltc, read_ltc file
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.

 RESTRICTIONS:
	The peak or minimum of the Gaussian must be the largest
	or smallest point in the Y vector.

 PROCEDURE:
	If the (MAX-AVG) of Y is larger than (AVG-MIN) then it is assumed
	that the line is an emission line, otherwise it is assumed there
	is an absorbtion line.  The estimated center is the MAX or MIN
	element.  The height is (MAX-AVG) or (AVG-MIN) respectively.
	The width is found by searching out from the extrema until
	a point is found less than the 1/e value.

 MODIFICATION HISTORY:
	DMS, RSI, Dec, 1983.


get_abun_table $SSW/packages/spex/idl/object_spex/get_abun_table.pro
[Previous] [Next]
 Name: get_abun_table

 Purpose:  Retrieve information about abundance table in use

 Method:  If model is mewe, then abundance table is always mewe_solar, and we
   call xr_rd_abundance to get array of abundances.  If model is chianti, then
   we look at what has been stored in ab_type_sav and abundance variables
   in chianti_kev_abundance common.

 Keywords:
   model - scalar or array containing 'mewe' or 'chianti'
   type - If set, return type of abundance (e.g. 'sun_coronal')
   abun - If set, return array of abundances)

 Written: 27-Apr-2006, Kim Tolbert

 CALLS:
 CALLED BY
	SPEX_FIT__DEFINE, fit_comp_kw


GET_ATOMIC_WEIGHT $SSW/packages/chianti/idl/low_level/get_atomic_weight.pro
[Previous] [Next]
 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:
	GET_ATOMIC_WEIGHT


 PURPOSE:

       to produce  an atomic weight. 

 CALLED BY:
	MAKE_CHIANTI_SPEC
 PROCEDURE:


 This routine converts the ion atomic number into an atomic weight. Where 
 an element has more than one isotope, the weight is that of the most 
 common.

 I've written this routine in order to apply a thermal broadening to 
 lines in a CHIANTI synthetic spectrum (see routine make_chianti_spec.pro).


 CALLING SEQUENCE:

       IDL>

 EXAMPLES:

 INPUTS:
        IZ 

 OPT. INPUTS :

 OUTPUTS:
       the atomic weight

 OPTIONAL OUTPUTS:

 KEYWORDS:

 CALLS: 
 COMMON:

 RESTRICTIONS:
            I go up to zinc (iz=30)


 SIDE EFFECTS:

 CATEGORY:
	
	synthetic spectra


 PREV. HIST. :

 WRITTEN     : 
       Ver.1, 22-Jun-00, Peter Young (PRY)

 MODIFICATION HISTORY:

  VERSION     : V 1, 22-Jun-00, Peter Young (PRY)


GET_CHIANTI_KEV_ABUN $SSW/packages/xray/idl/get_chianti_kev_abun.pro
[Previous] [Next]
 PROJECT:
   XRAY PACKAGE
 NAME:
   GET_CHIANTI_KEV_ABUN

 PURPOSE:
   This returns the abundances in use for the first 50 elements that
   are currently used in chianti_kev().

 CATEGORY:
   XRAY

 CALLING SEQUENCE:
   abundance = get_chianti_kev_abun( )

 CALLS:
	none
 INPUTS:
       none explicit, only through commons

 KEYWORD INPUTS:

 OUTPUTS:
       Returns an array of abundances relative to the abundance of Hydrodgen

 OPTIONAL OUTPUTS:
   none

 KEYWORDS:
   none
 COMMON BLOCKS:
   CHIANTI_KEV_abundance, CHIANTI_KEV_cont

 SIDE EFFECTS:
   none

 RESTRICTIONS:


 PROCEDURE:
   Reads values out of common blocks.

 MODIFICATION HISTORY:
   Version 1, richard.schwartz@gsfc.nasa.gov, 31-JAN-2005


get_contributions $SSW/packages/chianti/idl/other/DEM/get_contributions.pro
[Previous] [Next]
 PROJECT:  CHIANTI

       CHIANTI is an Atomic Database Package for Spectroscopic Diagnostics of
       Astrophysical Plasmas. It is a collaborative project involving the Naval
       Research Laboratory (USA), the University of Florence (Italy), the
       University of Cambridge and the Rutherford Appleton Laboratory (UK). 

     		          
 Purpose     : calculates the contribution functions G(T) at constant 
		pressure or density  of the lines present in the CHIANTI
		database, corresponding to  a given set of observed lines.

 Category    :
               
 Explanation : This routine is called by CHIANTI_DEM. It cannot be used as
		a stand-alone routine.
		The observation file is read by CHIANTI_DEM.
		GET_CONTRIBUTIONS starts reading 
		the ionization equilibrium file and the masterlist of the
		ions present in the CHIANTI database.
		GET_CONTRIBUTIONS  then searches the 
		CHIANTI database (ion per ion) for all the 
		theoretical lines corresponding to the observed	lines, i.e. 
		that lie in a OBS_WVL(i) +/- DELTA_LAMBDA_OBS(i) interval
		centered on the observed wavelength OBS_WVL(i).
		Then calculates the G(T) values for the temperature interval
		log(T)= 4.0 - 8.0  with steps of log(T) = 0.1
		A constant pressure OR a constant density for all the lines
 		is used. If you select a constant pressure,
               for each ion the contribution function is calculated at an 
               electron density N_e equal to the ratio of the pressure 
               and the temperature of maximum ionization fraction:  
               C=C( T, N_e = P/T_ion)
               The C(T) values are stored by GET_CONTRIBUTIONS in the output 
		file OUTPUT.CONTRIBUTIONS.

		In the case no theoretical lines corresponding to an observed
		line are found, the routine writes the wavelength of the line
		to be excluded from the fit in the array EXCLU_OBS_WVL_NO_TEO;
		these lines are then excluded from the fitting  by 
	 	CHIANTI_DEM. You might consider the possibility to start again
		incrementing the DELTA_LAMBDA_OBS, to see if there are 
		theoretical lines in the vicinity.


 Use         : called by CHIANTI_DEM to calculate the contribution functions

 CALLED BY:
	CHIANTI_DEM
 Examples    : 

    
 Inputs      :	Various, in form of keywords.
               
               
 Opt. Inputs : none
               
 Outputs     : OUTPUT.CONTRIBUTIONS  
		Is the file where all the contribution  functions G(T) are 
		stored. In the first two lines  the ionization equilibrium 
		file name, and the constant value of pressure or density 
		adopted are reported. Then for each line you have reported  
               the observed wavelength, the theoretical one, the element and
		ionization stage, then the C(T) values. At the end the 
		specification for each transition.


 Opt. Outputs: None
               
 Keywords    : (all passed by CHIANTI_DEM)


	CUT_GT:			if set, only those
				theoretical lines that have a MAX(G(T)) greater
      			        than the value set, are kept; it is useful to 
				set this value in order to reduce the number 
				of lines in the file where the G(T) are stored.

	DENSITY : 		the value of the density (Ne).

	FILE_INPUT:		if set, you are not 
				requested to select the observation file.

  
	N_MATCHES:              
		In the unlikely event that more than 20 (default value for 
		N_MATCHES) theoretical lines corresponding to an observed
		line are found, the routine stops; in this case, you have to 
		start again setting N_MATCHES equal to a greater number. 

	PRESSURE:     		the value of the pressure (Ne T)

	OUTPUT  :  	-the core name for the output


 Calls       : ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONVERT_TERMS, ION2SPECTROSCOPIC
	PICKFILE, POP_SOLVER, PROTON_DENS, READ_ELVLC, READ_IONEQ, READ_IONREC
	READ_MASTERLIST, READ_SPLUPS, READ_WGFA2, TRIM, ZION2FILENAME, concat_dir [4]
	convertname
 Common      : elvlc                          - energy levels
               wgfa                           - radiative data
               upsilon                        - upsilon data
		      
		obs, 	obs_int,obs_sig,n_obs
		obs_o,	obs_wvl,obs_id,obs_delta_lambda
 		dem, 	d_dem_temp,dem_temp,log_dem_temp,log_t_mesh,log_dem_mesh
		contr,	ch_tot_contr
		ab,	abund_name,abund_info,xuvtop,ioneq_name

		these are the commons with GET_CONTRIBUTIONS.PRO:

		various,	exclu_obs_wvl_no_teo,const_net,$
		 dem_temp_min,dem_temp_max,n_dem_temp,$
		 ch_wvl,ch_l1,ch_l2,ch_id,ch_z,ch_ion,ch_contr_wa,$
		 ch_pop,ch_contr_list, ch_term,ch_n_contr


 Restrictions: ;
		THIS IS NOT A STAND-ALONE PROCEDURE. 
		It is called by CHIANTI_DEM,
		and has a lot of common blocks with other procedures.

		In the unlikely event that more than 20 (default value for 
		N_MATCHES) theoretical lines corresponding to an observed
		line are found, the routine stops; in this case, you have to 
		start again setting N_MATCHES equal to a greater number. 

		Of course you need to have the enviroment variable CDS_SS_DERE
		pointing to the CHIANTI database top directory.

               
 Side effects: None known.
               
 Category    : spectrum
               
 Prev. Hist. :
       Written by Ken Dere (NRL) as part of the CHIANTI package 
       in collaboration with Brunella Monsignori Fossi, Enrico Landi
       (Arcetri Observatory, Florence), Helen Mason and Peter Young
       (DAMTP, Cambridge Univ.). Incorporated into the CDS software.  
 Written     : 
       Version 1, Giulio Del Zanna (GDZ)  5 November  1997 
	UCLAN (University of Central Lancashire, UK) 

 Modified    :  
       Version 2, 31-Oct-2000, GDZ, DAMTP.  Rewritten completely the routine,
       to make it compatible with CHIANTI v.3. Based the core calculations on
       new implementations due to Peter Young, CfA. 

       Version 3, 5-Dec-2000, GDZ, DAMTP. Fixed a bug when checking the 
       values in the .splups files.


       Ver. 4,  25-Apr-02, GDZ  
              Revised to account for v.4 variations. By default the proton
              rates are included in the calculation of the level population.

       V.5, Giulio Del Zanna (GDZ)
                   generalized directory concatenation to work for
                   Unix, Windows  and VMS. 

       V. 6,  10-July-2002  GDZ
                  Corrected a bug. It now properly includes by default the
                  proton rates in the population solver. 

       V. 7,  4-Oct-2003, GDZ
                  modified the input to POP_SOLVER, now it is dealt with an
                  input structure. 

       V. 8, 3-Nov-03  GDZ
                  Modified format e8.2 to e9.2 for Windows compatibility.

       V. 9, 4-May-05 Enrico Landi (EL)
                  Modified in order to include ionization and recombination
                  data in the input to POP_SOLVER

 VERSION     :     9, 4-May-05



get_conversion [1] $SSW/packages/spex/idl/original_spex/get_conversion.pro
[Previous] [Next]
PROCEDURE - GET_CONVERSION

PURPOSE   - Compute conversion factors as a function of the spectral model.
	     The conversion factors are the ratio of the count rate spectrum
            divided by the photon spectrum.

Category: SPEX
	
Inputs:
	E_IN - 2xM input energy bins
	DRM  - Detector response matrix dimensioned n x m where n is the number
	of output energy bins and m is the number of input energy bins.
	E_OUT - 2xN output energy bins. The E_OUT are optional.  In this
	case the conversion factors are set to the count rate in the units
	of the rows of the drm.
	F_MODEL - Spectral model used, e.g. power law or thermal brem.
	APAR - Parameters used in call to F_MODEL.

Optional Inputs:
	W_IN - Width of input energy bins.
Outputs:
	MODEL_IN - Photon spectrum defined on E_IN in photons/cm^2/s/keV
	MODEL_OUT - Photon spectrum defined on E_OUT
	CONVERSION - Conversion factors.

Call:  GET_CONVERSION, E_IN=E_IN, W_IN=W_IN, DRM=DRM, $
	F_MODEL=F_MODEL, APAR=APAR, E_OUT=E_OUT, $
	MODEL_IN = MODEL_IN, MODEL_OUT= MODEL_OUT, CONVERSION=CONVERSION 

 CALLS: ***
	EXIST, F_DIV, edge_products
 CALLED BY:
	Apar_init [1], Apar_init [2], F_CONVERSION [1], F_CONVERSION [2]
	RUN_CURVEFIT [1], RUN_CURVEFIT [2], countsmod_plot [1], countsmod_plot [2]
	spec_plot [1], spec_plot [2], spec_plot [3], spec_plot [4], spex_spec_plot [1]
	spex_spec_plot [2], spex_spec_plot [3], spex_spec_plot [4]
History:
	Written by RAS 92/9/26, used in Run_Curvefit and associated routines
	mod, ras, 17-jun-94, changed energy specification to edges instead of mean
	Version 2, ras, 21-mar-1996
	Version 3, made e_out optional, richard.schwartz@gsfc.nasa.gov, 18-aug-1997 


get_conversion [2] $SSW/packages/spex/pre2002/idl/get_conversion.pro
[Previous] [Next]
PROCEDURE - GET_CONVERSION

PURPOSE   - Compute conversion factors as a function of the spectral model.
	     The conversion factors are the ratio of the count rate spectrum
            divided by the photon spectrum.

Category: SPEX
	
Inputs:
	E_IN - 2xM input energy bins
	DRM  - Detector response matrix dimensioned n x m where n is the number
	of output energy bins and m is the number of input energy bins.
	E_OUT - 2xN output energy bins. The E_OUT are optional.  In this
	case the conversion factors are set to the count rate in the units
	of the rows of the drm.
	F_MODEL - Spectral model used, e.g. power law or thermal brem.
	APAR - Parameters used in call to F_MODEL.

Optional Inputs:
	W_IN - Width of input energy bins.
Outputs:
	MODEL_IN - Photon spectrum defined on E_IN in photons/cm^2/s/keV
	MODEL_OUT - Photon spectrum defined on E_OUT
	CONVERSION - Conversion factors.

Call:  GET_CONVERSION, E_IN=E_IN, W_IN=W_IN, DRM=DRM, $
	F_MODEL=F_MODEL, APAR=APAR, E_OUT=E_OUT, $
	MODEL_IN = MODEL_IN, MODEL_OUT= MODEL_OUT, CONVERSION=CONVERSION 

 CALLS: ***
	EXIST, F_DIV, edge_products
 CALLED BY:
	Apar_init [1], Apar_init [2], F_CONVERSION [1], F_CONVERSION [2]
	RUN_CURVEFIT [1], RUN_CURVEFIT [2], countsmod_plot [1], countsmod_plot [2]
	spec_plot [1], spec_plot [2], spec_plot [3], spec_plot [4], spex_spec_plot [1]
	spex_spec_plot [2], spex_spec_plot [3], spex_spec_plot [4]
History:
	Written by RAS 92/9/26, used in Run_Curvefit and associated routines
	mod, ras, 17-jun-94, changed energy specification to edges instead of mean
	Version 2, ras, 21-mar-1996
	Version 3, made e_out optional, richard.schwartz@gsfc.nasa.gov, 18-aug-1997 


get_evec [1] $SSW/packages/spex/idl/original_spex/get_evec.pro
[Previous] [Next]
extract the energy edges from a header of the form
	head.nobins_in 	-number of used input  energy edges
	head.nobins_out -number of used output energy edges
       head.e_in       -input energy edges, 2xn
	head.e_out      -output energy edges, 2xm


get_evec [2] $SSW/packages/spex/pre2002/idl/get_evec.pro
[Previous] [Next]
extract the energy edges from a header of the form
	head.nobins_in 	-number of used input  energy edges
	head.nobins_out -number of used output energy edges
       head.e_in       -input energy edges, 2xn
	head.e_out      -output energy edges, 2xm


get_fe_abun_rel2h $SSW/packages/spex/idl/object_spex/get_fe_abun_rel2h.pro
[Previous] [Next]
 Name: get_fe_abun_rel2h
 Purpose: Return Iron abundance relative to H from rel_abun value applied to
   specified abundance table
 Arguments:
   rel_abun - relative abundance value for Iron
   ab_type - type of abundance table to use (see choices in xr_rd_abundance)

 CALLS: ***
	XR_RD_ABUNDANCE
 CALLED BY:
	fit_comp_kw
 Example: print, get_fe_abun_rel2h(1., 'sun_photospheric')

 Kim Tolbert, 26-Apr-2006
 Modifications;


get_ieq $SSW/packages/chianti/idl/low_level/continuum/get_ieq.pro
[Previous] [Next]
 PROJECT:  CHIANTI

      CHIANTI is an Atomic Database Package for Spectroscopic Diagnostics of
      Astrophysical Plasmas. It is a collaborative project involving the Naval
      Research Laboratory (USA), the University of Florence (Italy), the
      University of Cambridge and the Rutherford Appleton Laboratory (UK). 

 NAME

      GET_IEQ()

 EXPLANATION

      For a specified ion (IZ, ION) and set of temperatures (TEMP) this 
      routine takes the ion fraction values tabulated in one of the CHIANTI 
      .IONEQ files, interpolates and extracts the values of the ion 
      fraction at the input temperatures.

 INPUTS

      TEMP   The temperature(s) at which the ion fractions are required.

      IZ     The atomic number of the element (e.g., 26 = iron).

      ION    The spectroscopic number of the ion (e.g., 13 = XIII).

 OPTIONAL INPUTS

      IONEQ_LOGT  The temperature output from the READ_IONEQ routine.

      IONEQ_FRAC  The ion fractions from the READ_IONEQ routine.

 OUTPUT

      A vector of same length as the input TEMP containing the ion 
      fractions at these temperatures.

 CALLS

      READ_IONEQ

 HISTORY

      Ver.1, 24-Jul-2002, Peter Young
      v.2, 14-Sept-2005, GDZ
      modified error message.


 VERSION 2 14-Sept-2005
 CALLS:
 CALLED BY
	FB_RAD_LOSS, INTEGRAL_CALC, ZETA_0, freebound


get_pks $SSW/packages/lparl/idl/ucon/morrison/get_pks.pro
[Previous] [Next]
NAME:
	get_pks
PURPOSE:
	To sbutract the background noise from x and y error jitter plots,
	identify and analyse the indivisual peaks over the threshold, and create tab
	files that contain the results.
SAMPLE CALLING SEQUENCE:
	get_pks
 CALLS: ***
	GAUSSFIT3, GAUSS_FUNCT3, deriv_arr [1], deriv_arr [2], find_contig [1]
	find_contig [2], plottimes [1], plottimes [2]
 CALLED BY:
	find_contig [2]
HISTORY:
	Written 20-Mar-97 by S.Qwan


getct $SSW/packages/ztools/color/getct.pro
[Previous] [Next]
 Load the current color table into a (256,3) byte array,
 and return it.

 CALLS:
 CALLED BY
	zmovie


GETV4TYPE $SSW/packages/ztools/vectors/getv4type.pro
[Previous] [Next]
 NAME:
	GETV4TYPE
 PURPOSE:
	Given the name of a coordinate system, return the 
	V4TYPE structure corresponding to it.  Used by
	V4HELP,V4UNIT, and V4TYPE.
 AUTHOR:
	Craig DeForest
 CALLS: ***
	DEFINE_V4TYPES, ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2]
	data_chk [1], data_chk [2]
 CALLED BY:
	V4HELP, V4METRIC, V4OK, V4PRINT, V4UNITS, V4_RESOLVE_XFORM, v4canon
 HISTORY:
	First implementation, 6-Oct-1997


go_exec_synop_msg $SSW/packages/lparl/idl/ucon/morrison/go_exec_synop_msg.pro
[Previous] [Next]
NAME:
	go_exec_synop_msg
PURPOSE:
	To send out a reminder of what needs to be 
	added to the campaign synopsis web page
HISTORY:
	Written 14-Jan-97 by M.Morrison


go_gen_exec_synop $SSW/packages/lparl/idl/ucon/morrison/go_gen_exec_synop.pro
[Previous] [Next]
NAME:
	go_gen_exec_synop
PURPOSE:
	To allow generation of the executive synopsis pages
DETAILS:
	index_only=1	;will only generate the index page
	nimgpday=20	;reduce the criteria for campaign image selection
HISTORY:
	Written Nov-96 by M.Morrison
	13-Jan-97 (MDM) - Added documentation header
			- Made selection available by xmenu_sel
	23-Apr-97 (MDM) - Added EIT path
			- Added some print help examples for bypass
	11-Sep-97 (MDM) - Added "oth_context" keyword option


GOFNT $SSW/packages/chianti/idl/gofnt.pro
[Previous] [Next]

 PROJECT:  CHIANTI

       CHIANTI is an Atomic Database Package for Spectroscopic Diagnostics of
       Astrophysical Plasmas. It is a collaborative project involving the Naval
       Research Laboratory (USA), the University of Florence (Italy), the
       University of Cambridge and the Rutherford Appleton Laboratory (UK). 


 NAME:
	GOFNT

 PURPOSE:

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

	Must specify line to form numerator and denominator
       Multiple lines can be selected and summed
       This can now be done interactively or not.

 CALLING SEQUENCE: 

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


 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:

       Many - see the keywords below.

 OUTPUTS:

	Temperature:  an array of temperatures 

       G:  Intensity  per unit emission measure N_e*N_H*dh [cm^-5].
           The resulting units are therefore erg cm^+3 s^-1 sr-1

           C(T)= 1/(4*!pi)* A_ji*(N_j(X^+m)/N(X^+m))*(N(X^+m)/N(X))*(N(X)/N(H))/N_e

            unless  /NOABUND is set, in which case 
           C(T)= 1/(4*!pi)* A_ji*(N_j(X^+m)/N(X^+m))*(N(X^+m)/N(X))/N_e

           G(T)=(hc/lambda_ij)*C(T) 
           G(T)= C(T)   if /PHOTONS is set

       Desc:  a short string description of the selected line


 OPTIONAL OUTPUTS:

	Postscript file withthe plot of G(T).

       Ascii file with the values of G(T). 
        
       VALUE      The array of G(T) values corresponding to logt0.


 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

       RPHOT   Distance from the centre of the star in stellar radius units.
               I.e., RPHOT=1 corresponds to the star's surface. (Default is
               infinity, i.e., no photoexcitation.)

       RADTEMP The blackbody radiation field temperature (default 6000 K).

       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 chosen G(T) is saved.

       NOABUND: If set, the G(T)'s are not multiplied by the abundance 
                factor.

       NOPROT   If set, then proton rates are not included.


	ABUND_NAME:  Name of the abundance file to use.  If not passed, then
		     the user is prompted for it.

	IONEQ_NAME:  Name of the ionization equilization name to use.  If not
		     passed, then the user is prompted for it.

       ALL          If set, all lines are calculated, including
                    the 'unobserved' ones. 

       LOWER_LEVELS
       UPPER_LEVELS
                    Arrays with the indices of the lower and upper levels
                    pertaining to the transitions you want to get. 
                    If more than one couple is given, the G(T) of the 
                    lines are summed.
                    Obviously, the given indices must correspond to transitions
                    that are present in the database.

       ARCSECS  
                 If set, units are photons (ergs) cm^+3 s^-1 arcsecs^-2

       VERBOSE

       LOGT0       An array of log T values for which the G(T) are wanted.
       VALUE       The array of G(T) values corresponding to logt0.
 
                   If logt0 is defined, and within the limits of the 
                   temperatures for which G(T) NE 0, the array VALUE
                   is returned with a simple spline interpolation.

 CALLS: ***
	CH_GET_FILE, CH_SYNTHETIC, CH_XMENU_SEL, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], ION2SPECTROSCOPIC, PS [1], PS [2], PSCLOSE [1], PSCLOSE [2]
	READ_ABUND, SPLINE, TRIM, concat_dir [4]
 COMMON BLOCKS: None

 RESTRICTIONS:

 SIDE EFFECTS:

 EXAMPLE:

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


 CATEGORY:

	spectral diagnostics


 MODIFICATION HISTORY:

 	Written by:	Ken Dere
	October 4, 1996:     Version 1
       14-Jul-2000     Peter Young, now calls pop_solver

       26-Oct-2000 GDZ, added keyword NOABUND to not multiply for the abundence
       factor. Corrected header for a wrong description.

	Version 4, 21-Dec-2000, William Thompson, GSFC
		Modified for better cross-platform graphics capability

  
       Version 5, 8-Nov-01, Giulio Del Zanna (GDZ). 

       Rewritten as a wrapper routine using the new procedures.
           Corrected a few inconsistencies in the plots.

       Version 6, 18-Nov-01, Peter Young
           Added /noprot, rphot and radtemp keywords.

       Version 7, 11-Dec-01, Peter Young
           Changed call to ch_strpad to strpad.

       V. 8, GDZ, 28-Apr-02 Added abund_name,ioneq_name keywords.
       v. 9  21-May-2002, GDZ
             generalized directory concatenation to work for
             Unix, Windows  and VMS. 

       V.10, 15-Aug-02, GDZ 
              Major revision:
              -Removed the call to ch_xselect_s, that did not work for long lists.
              -Added a '*' in the line lists, to identify 'unobserved' lines.
              -Replaced the commands to create PS file, to make it
               cross-platform compatible.
              -Added a large number of cosmetics, mainly lables to the axes and
               titles.
              -Added keyword ALL. If set, all lines are calculated, including
              the 'unobserved' ones. 
              -Added the CHIANTI version number in the outputs.

       V. 11, 19-Sep-02, GDZ
              Clarified output units.

       V.12, 25-Jun-03, GDZ, 
              Added many new keywords. Now is possible to use the routine 
              with background jobs, in not-interactive mode.
              Rounded the wavelengths. 

       V.13, 24-Sept-2003, GDZ 
              Corrected a bug when logt0 is not defined.

       V.14, 3-Nov-03  GDZ
             Modified format e8.2 to e9.2 for Windows compatibility.

 VERSION     :   14, 3-Nov-03 


GREEN_POT_FLAT $SSW/packages/ztools/magnetic/green_pot_flat.pro
[Previous] [Next]
 NAME:
	GREEN_POT_FLAT
 PURPOSE
	Calculates the flat-sun potential-field Green's 
	function for a specific	altitude and size of magnetogram 
	(pixel coordinates). You feed in the dimensions of the 
	magnetogram in pixels and the altitude at which you want
	the Green's function, and you get back a cube of values
	of the field components indexed in (X,Y,[coord]).
 INPUTS:
	W - width
	H - height
	Z - altitude of output G plane
 RETURNS:
	the Green's function image or, if Z is an array, cube.
 CALLS: ***
	FUG, NLM [1], NLM [2]
 HISTORY:
	Written by Craig DeForest, 15-Apr-99