[Previous]
[Next]
NAME:
IMAGE_CONT
PURPOSE:
Overlay an image and a contour plot.
CATEGORY:
General graphics.
CALLING SEQUENCE:
IMAGE_CONT, A
INPUTS:
A: The two-dimensional array to display.
KEYWORD PARAMETERS:
WINDOW_SCALE: Set this keyword to scale the window size to the image size.
Otherwise, the image size is scaled to the window size.
This keyword is ignored when outputting to devices with
scalable pixels (e.g., PostScript).
ASPECT: Set this keyword to retain the image's aspect ratio.
Square pixels are assumed. If WINDOW_SCALE is set, the
aspect ratio is automatically retained.
INTERP: If this keyword is set, bilinear interpolation is used if
the image is resized.
OUTPUTS:
No explicit outputs.
CALLS: ***
IMAGE_C
COMMON BLOCKS:
None.
SIDE EFFECTS:
The currently selected display is affected.
RESTRICTIONS:
None.
PROCEDURE:
If the device has scalable pixels, then the image is written over
the plot window.
MODIFICATION HISTORY:
DMS, May, 1988.
[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: INTEGRAL_CALC
PURPOSE:
To compute the atomic data integral for use in column or volume
emission measure work.
CATEGORY:
Scientific analysis
EXPLANATION:
Defining
G(T) = 0.83 * Fr(T) * N_j * A_ji / N_e
where Fr(T) is the ionisation fraction (e.g., from Arnaud &
Rothenflug), N_j the relative population of level j, A_ji the
A-value for the j->i transition and N_e the electron density. The
0.83 is the ratio of hydrogen to free electrons, which is constant
above around 10^4 K. This function is sharply-peaked at a
temperature T_mem (the temperature of maximum emission, which can
be different from the temperature of maximum ionisation, T_max)
and so an oft-used approximation is to take G(T) constant in the
range log T_mem - 0.15 to log T_mem + 0.15 and zero outside. The
value of the constant, which we call C_lambda here, is then given
by
C_lambda = integral { G(T) dT }
--------------------
T_mem * (10^0.15 - 10^-0.15)
If EM(s) is the column emission measure, F the flux (erg cm-2 s-1)
in a line lambda, Ab the abundance of the element and DE (erg) the
energy for the transition, then:
F = DE * Ab * C_lambda * EM(s)
If we are dealing with intensities I (erg cm-2 s-1 sr-1) then:
4pi * I = DE * Ab * C_lambda * EM(s)
This program extracts the ionisation balance and emissivities from
the CHIANTI database and calculates C_lambda for all lines in the
specified wavelength interval WRANGE by integrating over
0.02 dex temperature intervals.
The C_lambda functions for all the lines in the selected wavelength
range WRANGE are displayed as well as the temperature of maximum
emission (T_mem), DE*C_lambda and 4pi/(DE*C_lambda). These latter
two quantities are useful for the emission measure analysis.
Any combination of the displayed lines can then be blended and the
corresponding quantities for the blend will be displayed.
The function Fr(T) * N_j * A_ji can also be plotted at this stage.
CALLING SEQUENCE:
INTEGRAL_CALC, IZ, ION, [WRANGE=WRANGE, /CHOOSE, DENS=DENS]
EXAMPLES:
INTEGRAL_CALC, 26, 13, WRANGE=[200,205], /CHOOSE
INTEGRAL_CALC, 14, 10, WRANGE=[250,270], DENS=10.
INPUTS:
IZ: The atomic number of the ion
ION: The spectroscopic number of the ion (e.g., 12 = XII)
OPTIONAL INPUTS:
DENS: The density at which the emissivities are calculated
(default=10.)
WRANGE: Wavelength range for which C_lambda functions are
calculated. If not given, then the 10 strongest lines
are printed.
INDEX: Particular elements in the emissivity structure can be
selected with INDEX. This allows integral_calc to be run
'silently'. The output is contained in the OUTSTR structure.
If index is given as, e.g., [7,8], then the C_lambda
functions for these two lines are summed and output.
PATH: Directly specify the directory path where the Chianti data
for the ion is found
ABUND_FILE The name of a CHIANTI abundance file. This is used for
calculating the proton to electron ratio. Default is
!abund_file.
IONEQ_FILE The name of a CHIANTI ion balance file. This is used for
calculating the proton to electron ratio and evaluating
the T_max of the ion. Default is !ioneq_file.
RADTEMP The blackbody radiation field 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.)
KEYWORDS:
CHOOSE: Allow ion balance calculations to be selected manually
(see choose_ioneq.pro routine).
OPTIONAL OUTPUTS:
OUTSTR: A structure with the following tags
.tmem - the T_mem for the line(s)
.dec - total( de * c_lambda )
.pidec - 4 * pi / total( de * c_lambda )
Only output when INDEX is specified.
COMMON BLOCKS:
None.
CALLS: ***
CH_GET_FILE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EMISS_CALC
INT_TABULATED, READ_IONEQ, REVERSE, STR_SEP, concat_dir [4], get_ieq
HISTORY:
Ver.1: PRY, 28-JUN-97.
Ver.2: PRY, 7-OCT-97. Added TEMPI and GOFT, for plotting.
Ver.3: PRY, 31-JUL-98. Added PATH.
Ver.4: PRY, 6-APR-99. Added INDEX, OUTSTR. Removed TEMPI and GOFT
(these can be got from the g_of_t routine).
Ver.5: PRY, 9-Dec-01. Modified for v.4 of CHIANTI.
V.6, 21-May-2002, Giulio Del Zanna (GDZ)
generalized directory concatenation to work for
Unix, Windows and VMS.
V.7, 06-Aug-02 GDZ
Changed the use of CHIANTI system variables.
V.8, 6-Feb-2006, Peter Young
Integration is now performed on d(logT) intervals, rather than
dT intervals following problems identified by Luca Teriaca.
VERSION : 8, 06-Feb-06
[Previous]
[Next]
NAME: Intervals
PURPOSE: Graphically select a set of intervals from an X array.
The X, Y plot is already displayed
CATEGORY: Graphics, Fitting
CALLING SEQUENCE:
Intervals(xdisplay, xselect ,xwidth=xwidth [,xinput=xinput] [,iselect=iselect] $
[,style=style] [,color=color])
; CALLS TO: point
INPUTS:
xdisplay - array of displayed abscissae
if xdisplay is 2xn, then the two vectors are assumed
to be the hi and lo edge of the data point, and
xwidth is calculated
xwidth - the width of each x bin, xdisplay taken at the center
Optional inputs:
style - options
'contiguous' The intervals are all contiguous.
'discrete' The interval boundaries are chosen individually
'regular' Two boundaries are chosen. Intervals
are chosen for all bins between boundaries
Not used on direct input
xinput - for direct input of x edges, non-graphic
Non-graphic selection, a vector of 2xN time bins
are passed. No display feedback. For input times,
the discrete mode is used although if a boundary is within 1% of an
interval width it is chosen even if it violates the leading
trailing edge rules for discrete selection
color - can be used with routine linecolors
OUTPUTS:
xselect - the value of the boundaries for each interval selected
2 x number of intervals
iselect - the index of each boundary relative to xdisplay
for j=iselect(0,i) and k=iselect(1,i) the channels are
j through k-1, inclusive
CALLS: ***
ALPHA_PAGE [1], ALPHA_PAGE [2], CHECKVAR [1], CRANGE, DATATYPE [1], DATATYPE [2]
DATATYPE [3], GRAPHICS_PAGE, POINT [1], checkvar [2], edge_products, point [2]
CALLED BY:
Modify Titles
RESTRICTIONS: If selected points are not within the elements of xdisplay,
then the element of xdisplay less than the selected value is chosen.
Returns 0 if called by with device set to non-interactive and graphic
input is required.
PROCEDURE: Calls for a set of points to be input graphically or passed. For graphical
selection mode, lines are
drawn showing each bin selected. Intervals may be chosen contiguously
or individually. Default is individual points. When specifying points
interactively, the start and end of an interval defaults to the leading edge of
the selected bin for a stream of contiguous intervals, and to the trailing edge
for the last bin selected.
MODIFICATION HISTORY:
ras, 4 Oct 93
ras, 12-feb-94, enable non-graphic selection
[Previous]
[Next]
NAME: Intervals
PURPOSE: Graphically select a set of intervals from an X array.
The X, Y plot is already displayed
CATEGORY: Graphics, Fitting
CALLING SEQUENCE:
Intervals(xdisplay, xselect ,xwidth=xwidth [,xinput=xinput] [,iselect=iselect] $
[,style=style] [,color=color])
; CALLS TO: point
INPUTS:
xdisplay - array of displayed abscissae
if xdisplay is 2xn, then the two vectors are assumed
to be the hi and lo edge of the data point, and
xwidth is calculated
xwidth - the width of each x bin, xdisplay taken at the center
Optional inputs:
style - options
'contiguous' The intervals are all contiguous.
'discrete' The interval boundaries are chosen individually
'regular' Two boundaries are chosen. Intervals
are chosen for all bins between boundaries
Not used on direct input
xinput - for direct input of x edges, non-graphic
Non-graphic selection, a vector of 2xN time bins
are passed. No display feedback. For input times,
the discrete mode is used although if a boundary is within 1% of an
interval width it is chosen even if it violates the leading
trailing edge rules for discrete selection
color - can be used with routine linecolors
OUTPUTS:
xselect - the value of the boundaries for each interval selected
2 x number of intervals
iselect - the index of each boundary relative to xdisplay
for j=iselect(0,i) and k=iselect(1,i) the channels are
j through k-1, inclusive
CALLS: ***
ALPHA_PAGE [1], ALPHA_PAGE [2], CHECKVAR [1], CRANGE, DATATYPE [1], DATATYPE [2]
DATATYPE [3], GRAPHICS_PAGE, POINT [1], checkvar [2], edge_products, point [2]
CALLED BY:
Modify Titles
RESTRICTIONS: If selected points are not within the elements of xdisplay,
then the element of xdisplay less than the selected value is chosen.
Returns 0 if called by with device set to non-interactive and graphic
input is required.
PROCEDURE: Calls for a set of points to be input graphically or passed. For graphical
selection mode, lines are
drawn showing each bin selected. Intervals may be chosen contiguously
or individually. Default is individual points. When specifying points
interactively, the start and end of an interval defaults to the leading edge of
the selected bin for a stream of contiguous intervals, and to the trailing edge
for the last bin selected.
MODIFICATION HISTORY:
ras, 4 Oct 93
ras, 12-feb-94, enable non-graphic selection
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_confidence_interval
PURPOSE:
Calculates a confidence interval - 1 sigma uncertanty on
regularised solution
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_confidence_interval,reg_sol,counts,ecounts,Alpha,Betta,U,W,opt,f_thin,Guess,Npass,reg_sol_err
CALLS: ***
INV_REG_SOLUTION
INPUTS:
reg_sol - vector, regularised solution
counts - vector, count flux
ecounts - vector, 1 sigma uncertanty on count flux,
Results of Generalised Singular Value Decomposition:
alpha - diagonal elements of SA
betta - diagonal elements of SB
U,W - matrixes consisting of decomposition products
opt - scalar, regularisation parameter
f_thin - vector, forward-fit results
Guess - scalar (0 or 1.), use or not to use forward-fit in the constraint
Npass - scalar, number of Monte Carlo simulations to produce confidence interval
OPTIONAL INPUTS:
none
OUTPUTS:
reg_sol_err- vector, 1 sigma uncertanty on regularised solution
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
function_counts2photons, inv_counts2electrons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 30 September, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_counts2electrons
PURPOSE:
Inversion of count spectrum using regularisation + GSVD method
to obtain electron distribution
Quick start with the inversion software
http://www.astro.gla.ac.uk/users/eduard/rhessi/inversion/
The bremsstrahlung produced photon flux spectrum I(eps)
(photons/sec/cm^2/keV) at the Earth is given by the integral
I(eps)=1/(4*!Pi*1AU^2)*\int_{eps}^{infinity} S(eps,e)F(e)de
or in matrix form
I=S*F
where
F(e) = <V*n*Fe(e)>
F(e) - density and volume weighted mean electron flux spectrum
[electrons/sec/cm^2/keV]
n - average number density of the surrounding plasma, [cm^-3]
V - average emitting volume, [cm^3]
S(eps,e) - differential bremsstrahlung cross-section, [cm^2/keV]
Fe(e) - mean electron flux spectrum [electrons/sec/cm^2/keV]
The corresponding count flux spectrum in the X-ray detectors
C(eps) [counts/sec/cm^2/keV] can be written in matrix form
C = A*F, where A= DRM*S
We know C and A and want to find F. This problem is ill-conditioned
and regularision (additional constraints) should be applied.
The code finds the solution for the problem as a function of lambda
||A*F-C||^2+lambda*||L*(F-F0)||^2=min
where
L - constraint matrix
F0 - thin-target fit from SPEX/OSPEX
lambda - regularisation parameter found using descripancy principle
||A*F(lambda)-C||=reg_tweak*||dC||
where
dC - 1 sigma uncertanty on count flux, [counts/sec/cm^2/keV]
For details see:
Kontar et al,2004,Sol Phys,225,293-309
(http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2004SoPh..225..293K )
Kontar et al,2005,Sol Phys,226,317-325
(http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2005SoPh..226..317K )
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_counts2electrons,obj=obj,version=version,order=order,Npass=Npass,Guess=Guess,reg_tweak=reg_tweak
CALLS: ***
FCHECK, INV_GET_DATA_OSPEX, INV_REG_SOLUTION, INV_RESIDUALS
inv_confidence_interval, inv_cross_section, inv_get_data_spex [1]
inv_get_data_spex [2], inv_get_f_thin_ospex, inv_get_f_thin_spex, inv_gsvdcsq
inv_make_constraint, inv_reg_parameter, inv_reg_resolution
inv_save_electrons [1], inv_save_electrons [2]
INPUTS:
OPTIONAL INPUTS:
obj - OSPEX object name, if not set assumes old SPEX
version - string, version of the inversion code (currently only one version exist)
order - integer, regularization order. Can be 0 (default), 1, or 2.
Npass - integer, number of random noise realisations for the confidence strip.
Default is 30.
Guess - integer, 1 or 0 (default) - use or NOT use forward-fit in the constraint
reg_tweak - float, parameter to adjust the regularization parameter (default is 1).
ee_in - 2D array of electron bin energies (2,Bin_Number) in keV
for example from 3 keV to 100 keV with 1 keV
ee_in=transpose([[findgen(100)+3.],[findgen(100)+4.]])
OUTPUTS:
F(e) =<VnFe> - regularised electron spectrum, [10^50 electrons/sec/cm^2/keV]
dF - 1 sigma error, [10^50 electrons/sec/cm^2/keV]
e - middle point electron energy, keV
FWHM - energy resolution of the regularised solution [keV]
The results of the inversion is the regularised electron flux
saved to file with the name date of the observation
Format: Y1Y1Y1Y1M1M1D1D1_H1H1M1M1S1S1_H2H2M2M2S2S2
corresponding to the start 1 and end 2 of the time interval
The results are also plotted into PS files.
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Version 1, eduard(at)astro.gla.ac.uk, 23 July, 2004
30 September, 2005 - time interval added
31 October, 2005 - now works with OSPEX
15 january 2006 - added ee_in array option
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_counts2photons
PURPOSE:
Inversion of count spectrum using regularisation + GSVD method
to obtain model-independent photon spectrum
Quick start with the inversion software
http://www.astro.gla.ac.uk/users/eduard/rhessi/inversion/
The observed count flux spectrum in the X-ray detectors
C(eps) [counts/sec/cm^2/keV] can be written in matrix form
C = DRM*F
DRM - dynamic responce matrix of instrument
We know C and DRM and want to find a photon flux F [counts/sec/cm^2/keV].
This problem is ill-conditioned
and regularision (additional constraints) should be applied.
The code finds the solution for the problem as a function of lambda
||DRM*F-C||^2+lambda*||L*(F-F0)||^2=min
where
||...|| - L2 norm
L - constraint matrix
F0 - a model of photon spectrum from SPEX/OSPEX
lambda - regularisation parameter found using descripancy principle
||A*F(lambda)-C||=reg_tweak*||dC||
where
dC - 1 sigma uncertanty on count flux, [counts/sec/cm^2/keV]
For details see:
Kontar et al,2004,Sol Phys,225,293-309
(http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2004SoPh..225..293K )
Kontar et al,2005,Sol Phys,226,317-325
(http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2005SoPh..226..317K )
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
INV_COUNTS2PHOTONS,obj=obj,order=order,Npass=Npass,Guess=Guess,reg_tweak=reg_tweak
CALLS: ***
FCHECK, INV_GET_DATA_OSPEX, INV_REG_SOLUTION, INV_RESIDUALS
inv_confidence_interval, inv_get_data_spex [1], inv_get_data_spex [2]
inv_gsvdcsq, inv_make_constraint, inv_reg_parameter, inv_reg_resolution
inv_save_photons, spex_current [1], spex_current [2]
INPUTS:
none
OPTIONAL INPUTS:
obj - OSPEX object name, if not provided assumes old SPEX
version - string, version of the inversion code (currently only one version exist)
order - integer, regularization order. Can be 0 (default), 1, or 2.
Npass - integer, number of random noise realisations for the confidence strip.
Default is 30.
Guess - integer, 1 or 0 (default) - to use or NOT to use forward-fit in the constraint
reg_tweak - float, parameter to adjust the regularization parameter (default is 1).
OUTPUTS:
F(e) - regularised photon spectrum, [photons/sec/cm^2/keV]
dF - 1 sigma error, [photons/sec/cm^2/keV]
FWHM - energy resolution of the regularised solution [keV]
The results of the inversion are returned as a structure
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Version 1, eduard(at)astro.gla.ac.uk, 28 October, 2005
31/10/05, obj reference added
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_cross_section
PURPOSE:
Calculates cross-section matrix
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_cross_section,ee,eps,z,cs,de
CALLS: ***
Brm_BremCross
INPUTS:
ee - array, mid-bin electron energy, keV
de - array, electron energy bin width, keV
eps - mid-bin count energy, keV
z - average number of electrons per H atom in solar corona
OPTIONAL INPUTS:
none
OUTPUTS:
cs - cross-section matrix
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
inv_counts2electrons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_get_data_spex
PURPOSE:
Grabs all data from OSPEX for inversion
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_get_data_ospex
CALLS: ***
INV_GET_DATA_OSPEX, TIME2FILE
INPUTS:
obj - object name
OPTIONAL INPUTS:
none
OUTPUTS:
ee2N - 2D array, electron energy bin edges
ec2N - 2D array, count energy bin edges
counts - count flux photons/kev/s/cm^2
Ephoton - photon errors photons/kev/s/cm^2
drm_out - spectral responce matrix
counts/sec/keV/cm^2 /(photons/sec/keV/cm^2)
time_inv - string, time interval of the data
efit_range - array of indexes, electron energies to invert
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
inv_counts2electrons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Version 1, eduard(at)astro.gla.ac.uk, 30 July, 2005
30 September, 2005 - time interval added
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_get_data_spex
PURPOSE:
Grabs all data from SPEX for inversion
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_get_data_spex
CALLS: ***
GETUTBASE [1], GETUTBASE [2], TIME2FILE, spex_current [1], spex_current [2]
INPUTS:
none
OPTIONAL INPUTS:
none
OUTPUTS:
ee - photon energy bins 2D array
eph - count energy bins 2D array
Photon - photon flux photons/kev/s/cm^2
Ephoton - photon errors photons/kev/s/cm^2
drm_out - Spectral Responce Matrix
counts/sec/cm^2/keV/(photons/sec/cm^2/keV)
time_inv - string, time interval of the data
efit_range - range of acceptable output energies
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
inv_counts2electrons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
Version 1, eduard(at)astro.gla.ac.uk, 23 July, 2004
30 September, 2005 - time interval added
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_get_f_thin_ospex
PURPOSE:
Grabs all data from OSPEX for inversion
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_get_f_thin_ospex,obj,ee,f_thin_model
CALLS:
none
INPUTS:
obj - OSPEX object name
efit_range - range of indexes for the inversion
OPTIONAL INPUTS:
none
OUTPUTS:
ee - photon energy bins 2D array
eph - count energy bins 2D array
Photon - photon flux photons/kev/s/cm^2
Ephoton- photon errors photons/kev/s/cm^2
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
inv_counts2electrons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 28 October, 2005
Sa"m spotted the change in 'vth' function
now allows three parameters from 'vth'
(new parameter, iron abandance is not used)
eduard 11/08/2006
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_get_f_thin_spex
PURPOSE:
Grabs all data from SPEX for inversion
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_get_f_thin_spex,ee,f_thin_model
CALLS: ***
F_VTH_THIN, spex_current [1], spex_current [2]
INPUTS:
none
OPTIONAL INPUTS:
none
OUTPUTS:
ee - photon energy bins 2D array
eph - count energy bins 2D array
Photon - photon flux photons/kev/s/cm^2
Ephoton- photon errors photons/kev/s/cm^2
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
inv_counts2electrons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_gsvdcsq
PURPOSE:
To perform Generalised Singular Value Decomposition of two matrixes with
double precision math
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_gsvdcsq, A,B, alpha,betta,U,V,W
CALLS: ***
REVERSE
INPUTS:
A - cross-section matrix
B - regularization matrix (should be square)
OPTIONAL INPUTS:
none
OUTPUTS:
Results of Generalised Singular Value Decomposition:
A=U*SA*W^-1
B=V*SB*W^-1
where SA and SB are diagonal and SA^2+SB^2=1
matrixes U and V are ortogonal e.g. U*U^T=U^T*U=1, V*V^T=V^T*V=1
alpha - diagonal elements of SA
betta - diagonal elements of SB
U,V,W - matrixes consisting of decomposition products
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
function_counts2photons, inv_counts2electrons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
20- Sept-2005: corrected SVDC routine output - re-ordering SValues and SVectors
Note: SVDC produces non-decreasing singular values
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_make_constraint
PURPOSE:
to make contraint matrix
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_make_constraint,L,ee,de,fbar0,order
CALLS:
none
INPUTS:
ee - array, middle bin energy
de - array, width of energy bins
fbar0 - array, forward fit guess
order - scalar, oder of regularization
OPTIONAL INPUTS:
none
OUTPUTS:
L - constraint matrix
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
function_counts2photons, inv_counts2electrons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
second order regularization works somewhat worse than zero/first
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_reg_parameter
PURPOSE:
to compute regularization parameter
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_reg_parameter,sigmaA,SigmaB,U,W,Data,Err,Fbar_fit,reg_tweak,opt
CALLS:
none
INPUTS:
SigmaA - vector, generalised singular values
SigmaB - vector, generalised singular values
U - matrix, GSVD matrix
W - matrix, GSVD matrix
Data - vector, containing count flux
Err - vector, uncertanty on count flux
Fbar_fit-vector, forward-fit for the electron distribution
reg_tweak-scalar, parameter to adjusting regularization
OPTIONAL INPUTS:
none
OUTPUTS:
opt - regularization parameter
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
function_counts2photons, inv_counts2electrons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
16- Sept-2005: now plots to display and eps files
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_reg_resolution
PURPOSE:
Calculates resolution of regularised solution
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_reg_resolution,Alpha,Betta,opt,w,ee,de,FWHM
CALLS:
none
INPUTS:
Alpha - vector, generalised singular values
Betta - vector, generalised singular values
opt - regularisation parameter
w - matrix, generalised singular value decomposition
ee - electron bin average energy, keV
de - electron bin width, keV
OPTIONAL INPUTS:
none
OUTPUTS:
FWHM - resolution in keV defined as full width at half maximum
of the resolution matrix
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
CALLED BY:
function_counts2photons, inv_counts2electrons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 Sept, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_reg_solution,sigmaA,SigmaB,U,W,data,opt,fbar_fit,reg_sol
PURPOSE:
calculates regulalarised solution
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_reg_solution,sigmaA,SigmaB,U,W,data,opt,fbar_fit,reg_sol
CALLS: ***
INV_REG_SOLUTION
INPUTS:
SigmaA - vector, generalised singular values
SigmaB - vector, generalised singular values
U - matrix, GSVD matrix
W - matrix, GSVD matrix
data - vector, containing count flux
opt - scalar, regularization parameter
Fbar_fit-vector, electron flux taken from forward-fit
OPTIONAL INPUTS:
none
OUTPUTS:
reg_sol - regularization parameter
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 16 Sept, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_save_electrons
PURPOSE:
The routines saves and plots main results of the regularization
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_save_electrons,ee,e_c,reg_sol,reg_sol_err,FWHM,f_thin,counts,ecounts,ph_reg,sol_file,sol_ps
CALLS: ***
PLOTERROR
INPUTS:
ee - vector, electron middle bin energy
e_c - vector, count middle bin energy
reg_sol- vector, regularised solution
reg_sol_err - vector, 1 sigma errors for regularised solution
FWHM - vector, energy resolution of the regularised solution
f_thin - vector, forward-fit
counts - vector, input count flux
ecounts - vector, 1 sigma uncertanties for count flux
ph_reg - vector, regularised count flux
sol_file - string, output data filename
sol_ps - string, PS plot filename
OPTIONAL INPUTS:
OUTPUTS:
IDL save file with the results
PS file with the results
KEYWORDS:
none
CALLED BY:
inv_counts2electrons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_save_electrons
PURPOSE:
The routines saves and plots main results of the regularization
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_save_electrons,ee,e_c,reg_sol,reg_sol_err,FWHM,f_thin,counts,ecounts,ph_reg,sol_file,sol_ps
CALLS:
none
INPUTS:
ee - vector, electron middle bin energy
e_c - vector, count middle bin energy
reg_sol- vector, regularised solution
reg_sol_err - vector, 1 sigma errors for regularised solution
FWHM - vector, energy resolution of the regularised solution
f_thin - vector, forward-fit
counts - vector, input count flux
ecounts - vector, 1 sigma uncertanties for count flux
ph_reg - vector, regularised count flux
sol_file - string, output data filename
sol_ps - string, PS plot filename
OPTIONAL INPUTS:
OUTPUTS:
IDL save file with the results
PS file with the results
KEYWORDS:
none
CALLED BY:
inv_counts2electrons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
[Previous]
[Next]
PROJECT:
RHESSI/INVERSION
NAME:
inv_save_photons
PURPOSE:
The routines saves and plots main results of the regularization
CATEGORY:
HESSI, Spectra, Inversion
CALLING SEQUENCE:
inv_save_photons,ee,e_c,reg_sol,reg_sol_err,FWHM,ph_thin,counts,ecounts,ph_reg,sol_file,sol_ps
CALLS: ***
PLOTERROR
INPUTS:
ee - vector, electron middle bin energy
e_c - vector, count middle bin energy
reg_sol- vector, regularised solution
reg_sol_err - vector, 1 sigma errors for regularised solution
FWHM - vector, energy resolution of the regularised solution
f_thin - vector, forward-fit
counts - vector, input count flux
ecounts - vector, 1 sigma uncertanties for count flux
ph_reg - vector, regularised count flux
sol_file - string, output data filename
sol_ps - string, PS plot filename
OPTIONAL INPUTS:
OUTPUTS:
IDL save file with the results
PS file with the results
KEYWORDS:
none
CALLED BY:
function_counts2photons, inv_counts2photons
COMMON BLOCKS:
none
SIDE EFFECTS:
RESTRICTIONS:
MODIFICATION HISTORY:
eduard(at)astro.gla.ac.uk, 23 May, 2005
[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:
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/c_2
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4]
CALLED BY:
PLOT_POPULATIONS, SETUP_ION
EXAMPLE:
> ion2filename,'c_2d',filename
> print,filename
> !xuvtop/c/c_2d/c_2d
MODIFICATION HISTORY:
Written by: Ken Dere
V.2, September 1999: added for use with Version 3
V.3, 21-May-2002, Giulio Del Zanna (GDZ)
generalized directory concatenation to work for
Unix, Windows and VMS.
VERSION : 3, 21-May-2002
[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:
ION2SPECTROSCOPIC
PURPOSE:
provide identification string
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'
CALLS: ***
STR_SEP
CALLED BY:
CH_SYNTHETIC, DENSITY_RATIOS, GOFNT, PLOT_POPULATIONS, POP_SOLVER
TEMPERATURE_RATIOS, bb_rad_loss, ch_ss, get_contributions
EXAMPLE:
> ion2spectroscopic,'fe_13',name
> print,name
> Fe XIII
> ion2spectroscopic,'o_6d',name
> print,name
> O VI d
MODIFICATION HISTORY:
Written by: Ken Dere
September 1999: Version 3.0
Ver.2, 11-Dec-2001, Peter Young
Revised routine; removed call to repstr
V.3, 29-May-2002, Giulio Del Zanna (GDZ)
Added output keyword dielectronic.
V.4, 12-Aug-02, GDZ
Corrected a typo concerning XXII.
VERSION : 4, 12-Aug-02
[Previous]
[Next]
NAME:
ION_FRAC_INTERP
PROJECT
CHIANTI
EXPLANATION
Performs interpolation of an ion fraction array (such as contained in
the CHIANTI .ioneq files) to yield ion fractions at temperatures TEMP.
Note that the ion must already have been selected before calling this
routine, since IONEQ_FRAC is a 1D array. The routine GET_IEQ is an
alternative if the ion has not been selected.
INPUTS
TEMP Temperature(s) for which ion fractions are required.
Units: K.
IONEQ_LOGT Log (base 10) of temperature (units: K). A 1D array of
temperatures for which the ion fraction is defined.
IONEQ_FRAC A 1D array of ion fractions at the temperatures defined by
ioneq_logt
OUTPUT
The ion fraction defined at the temperatures TEMP. If values of TEMP lie
outside the range of the ion fraction or the range of IONEQ_LOGT, then
values of 0 are returned at these temperatures.
HISTORY
Ver.1, 10-Jun-2005, Peter Young
CALLED BY
CORRECT_POPS
[Previous]
[Next]
EXPLANATION:
When accessing ionisation balance data from the CHIANTI database, it
is output at log temperature values from 4 to 8 at 0.1 intervals.
For display purposes it is often nice to perform spline interpolation
to give a smoother function. This interpolation should be performed
on the logarithm of the data as this is more slowly varying.
This routine performs such an interpolation. It is only essential to
input G_T and N. Specifying T is optional (see below), while TI and
G_TI are output. N gives the number of points within an interval over
which interpolation is performed.
INPUTS:
G_T: Data for which interpolation required
OPTIONAL INPUTS:
T: Values at which is G_T is tabulated. If not specified, then
taken as 4 to 8 in 0.1 intervals.
N: Specifies `smoothness' of fit. E.g., N=5 means that single
intervals are divided into 5 intervals.
TI: If some temperatures are specified, then the SPLINE call is
used to work out the values of G_TI that correspond to these
temperatures. Only works if N is not specified.
OUTPUTS
T: If not specified, then output as an array from 4 to 8 in 0.1
intervals
TI: Interpolated T values. If the TI are specified on the command
line, then these values are returned.
G_TI: Interpolated G_T values
KEYWORDS
PLOT - The interpolated data is displayed together with the original
data.
EXAMPLE:
g_t=g_of_t(26,13,/ray)
ion_interp,t,g_t,ti,g_ti,5,/plot
plot,t,g_t,psym=2,xra=[5.8,6.7]
oplot,ti,g_ti
ion_interp,t,g_t,[6.112,6.254],g_ti,/plot
CALLS: ***
SPLINE
HISTORY:
Ver 1, PRY 17-JUN-98
Ver 2, PRY 10-AUG-98, corrected minor bug
Ver 3, PRY 22-SEP-98, corrected interpolation error
Ver 4, PRY 3-MAR-99, now allows TI to be specified
CONTACT:
Peter Young, Cambridge University (P.R.Young@damtp.cam.ac.uk)
[Previous]
[Next]
NAME:
ISNUM
PURPOSE:
To tell you if a variable is numeric or not
CALLING SEQUENCE:
if isnum(a) then ...
INPUTS:
a - the variable to check
RETURNS:
a boolean
KEYWORDS:
real - if set, require that "a" lie on the real number line.
AUTHOR:
Craig DeForest
CALLS: ***
data_chk [1], data_chk [2]
CALLED BY:
V4, v4canon
HISTORY:
Original implementation: 9-Oct-97
[Previous]
[Next]
NAME:
ISOTHERMAL
PURPOSE:
Computes spectra from isothermal plasmas. A number of isothermal
plasmas can be included.
Note that this routine has a number of unique features that
distinguish it from the other CHIANTI synthetic spectra routines.
See the Programming Notes section.
INPUTS:
WMIN Minimum of desired wavelength range in Angstroms.
WMAX Maximum of desired wavelength range in Angstroms.
WAVESTEP Bin size of spectrum (in Angstroms)
TEMP Electron temperature (or array).
OPTIONAL INPUTS
PRESSURE Electron pressure in units of cm^-3 K.
EDENSITY Electron density in units of cm^-3.
EM Emission measure. The units of EM govern the intensity
units of the emission lines (i.e., column or volume
emission measure units). If EM is not specified, then the
emission measure is set to (N_e * N_H) where N_e is
derived from the user-specified PRESSURE or EDENSITY,
and N_H is derived from the routine PROTON_DENS.PRO.
SNGL_ION Rather than include the entire list of CHIANTI ions in
the calculation, this input can be used to select a
single ion, or a number of different ions. E.g.,
SNGL_ION='s_2' or SNGL_ION=['s_2','s_3','s_4'].
RADTEMP The blackbody radiation field 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.)
MASTERLIST The list of ions that will be considered for the
spectrum is contained in the masterlist file in the
CHIANTI directories. The user can specify his own file
through this keyword. E.g.,
masterlist='/user/home/masterlist.ions'
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.
KEYWORDS
NOPROT Switch off the inclusion of proton rates in the level
balance.
ERGS The units of the output spectrum are by default in photons.
Setting /ERGS switches to erg units.
CONT Adds continuum (free-free, free-bound, two-photon) to
spectrum.
ALL Include all lines, i.e. also those for which wavelengths
are only theoretical and not observed.
OUTPUTS:
LAMBDA Wavelength array of calculated synthetic spectrum.
SPECTRUM Intensity array. The units depend on the user inputs to
ISOTHERMAL -- see note below.
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
PROGRAMMING NOTES
Intensity Units
---------------
The units are of the form photons cm^3 s^-1 sr^-1 * (units of EM),
changing to ergs if the /ergs keyword is set.
The volume emission measure (N_e*N_H*V) has units cm^-3.
The column emission measure (N_e*N_H*h) has units cm^-5.
Unique features
---------------
The emission lines in the final spectrum have no width and thus
each occupies a single pixel of the spectrum. The size of the
pixels are set by WAVESTEP.
As stated above, the units of the output spectrum are
photons cm^3 s^-1 sr^-1, i.e., there is no "per angstrom" term.
This means that (i) the height of the emission lines in the
spectrum does not change with varying WAVESTEP, and (ii) the height
of continuum does change with WAVESTEP.
COMMON BLOCKS
ELEMENTS
CALLS
CH_SYNTHETIC, READ_ABUND, CH_GET_FILE, CONCAT_DIR, FREEFREE,
FREEBOUND, TWO_PHOTON
HISTORY
Ver.1, 8-Apr-02, Peter Young Rutherford Appleton Laboratory,
p.r.young@rl.ac.uk
Tries to replicate the behaviour of the original ISOTHERMAL which
was found in earlier versions of CHIANTI (v.3 and earlier).
MODIFICATION HISTORY
Ver. 2, Giulio Del Zanna (GDZ), 28-Apr-02
Added abund_name,ioneq_name keywords.
Also, added photons keyword in call to MAKE_CHIANTI_SPEC.
Ver. 3, Peter Young, 24-May-02
Modified to produce arrays of spectra when an array of
temperatures is given
V.4, GDZ, 28-May-02
Added a couple of checks on file existence and modified the call
to ch_synthetic and make_chianti_spec due to change of keyword
names.
V.5, Peter Young, 16-Jul-02
Restructured routine to avoid crashes when a large number of
temperatures is input.
V.6, 8-Aug-02 GDZ
Added one error checking
V.7, 18-Aug-03, Peter Young
Added EM= keyword.
V.8, 14-Sept-2005 GDZ
Added ALL keyword and modified header, error message.
V.9, 3-Oct-2005, GDZ
Now the FOR loop accepts more than 32000 lines.
VERSION :
Version 9, 3-Oct-2005
CALLS:
CALLED BY
moffat2d, trace_psf_isothermal
[Previous]
[Next]
NAME:
ISVALID
PURPOSE:
Returns validity flag for its argument
CALLING SEQUENCE:
result = isvalid(variable)
INPUTS:
variable: the variable to be tested
OPTIONAL INPUT PARAMETERS:
(none)
KEYWORD PARAMETERS:
(none)
CALLED BY:
CALC_LOI_ROLL, COORD [2], COORD [3], DISPLOI_MON5K, FIELDLINE, FOT_ROLL, GETV4TYPE
MAKE_DIPOLES, MAKE_SYNOP, PIX2V4, PLOT_PTLIST, ROLL_PLOT, SUNEARTHDIST, V4, V42PIX
V4DIFF_ROT, V4HELP, V4MCART, V4MSPH, V4PRINT, V4UNITS, V4XCARR2HEL, V4XCART2SPH
V4XHEL2CARR, V4XS2SC, V4XS2SRS [1], V4XSC2HC [1], V4XSC2HC [2], V4XSC2HEC, V4XSC2S
V4XSPH2CART, V4_RESOLVE_XFORM, ZCLIP, ZCONTAINS, ZDEGR, ZDEROTATE, ZGETPLUME, ZGRID
ZHOVER, ZMKHDR, ZPAD, ZPRINTSUN, ZUNPAD, cartdist, cube_interp, datify, disp_sci160k [1]
disp_sci160k [2], dpcstr [1], dpcstr [2], equalize_rasters, find_launchpoints
fixinate_eit, fixinate_lasco, fixinate_trace, getct, hao_hdr, id_esc, id_unesc
local_mag_extrap, make_grid_sphere, mdialign, mon_sci5k, plot_loi_mmad, radial_bkg
redo_disploi, redo_mon_sci5k, struct_eq, trace_field, unpack_trace, wmatch, zaspect
zbytscl, zcorralign, zcurs_ok, zd4, zdeheliographinize, zdiff_rot, zhelio2xy
zheliographinize, zintervals, zmagoverlay, zmatch, zmontage, zmovie, zmovify
zmovinate, zpb0r [1], zpb0r [2], zscale, zsi, zstructify, ztrack, zunits, zunspike
zunwrap, zxy2helio
RESTRICTIONS:
None I know of....
MODIFICATION HISTORY:
Created by Craig DeForest, 4/13/1995
[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
ITOH
EXPLANATION
Calculates the relativistic free-free continuum using the fitting
formula of Itoh et al. (ApJS 128, 125, 2000).
INPUTS
TEMP Temperature (in K).
WVL Wavelengths in angstroms. Can be a scalar or vector. If /keV is
set, then WVL is assumed to contain energies in keV units.
OUTPUTS
INT Free-free continuum emissivity in units of
10^-40 erg cm^3 / s / sr / Angstrom per unit emission
measure [ integral(N_e N_H dh) in cm^-5 ]. If T is given as
a 1-D array, then RAD will be output as a 2-D array,
with one element for each temperature and wavelength
(but also see SUMT).
If the keyword /keV is set, then the units of INT will be
10^-40 erg cm^3/s/sr/keV
OPTIONAL INPUTS
DEM_INT An array of same length as TEMP which contains the
differential emission measure values at each temperature.
The emissivity at each temperature is multiplied by the
DEM value and the d(logT) value.
MIN_ABUND This keyword allows the specification of a minimum abundance,
such that any elements with an abundance (relative to
hydrogen) less than MIN_ABUND will not be included in the
calculation. E.g., MIN_ABUND=1e-5.
KEYWORDS
NO_SETUP By default the routine asks the user which ion balance
and abundance files to use via pop-up widgets. If
/no_setup is used then this data is taken from the common
block.
SUMT The default is to output the intensity array as an array
of size (nwvl x nT). Setting this keyword performs a sum
over the temperatures to yield a vector of same size as
the input wavelengths, thus producing the complete
free-free spectrum.
PHOTONS Gives output emissivity in photon units rather than ergs.
KEV If set, then WVL is assumed to contain energies in keV units
rather than wavelengths in Angstroms.
CALLS
SETUP_ELEMENTS
PROGRAMMING NOTES
In the Itoh et al. paper they state that their fitting formula is
valid for ion charges (Z_j) of 1-28. The data-file they provide
actually goes up to Z_j=30, and so you will see that the loop over
z (see below) goes up to 30.
There is no restriction on the elements for which the fitting
formula is valid, and so all elements are allowed to be included
(subject to their abundances being non-zero).
HISTORY
Ver.1, 3-Dec-2001, Peter Young
Ver.2, 22-May-2002, Peter Young
Added MIN_ABUND optional input.
Ver.3, 28-May-2002, Peter Young
Corrected way in which DEM is handled.
Ver.4, 9-Mar-2006, Peter Young
Added /keV keyword.
CALLS:
CALLED BY
freefree
[Previous]
[Next]
NAME:
IXCOM
PURPOSE
For calling the FORTRAN program XCOM to calculate photon cross
sections and plot various parameters.
Calls the FORTRAN routine IXCOMN through CALL_EXTERNAL. IXCOMN calls
XCOM if the XCOM command is given. , Then calls plotting routine XPLOT
CATEGORY: HESI, GEN
CALLING SEQUENCE: Ixcom, x=X,dens=xdens,subst=Csubst
CALLS: ***
SETLOG, XPLOT
INPUTS:
none
OPTIONAL INPUTS:
none
OUTPUTS:
see keywords
OPTIONAL OUTPUTS:
none
KEYWORDS:
OUTPUT:
X=x, The array of attenuation coefficients (see HESI_MENU help,
or Xcom documentation (XCOM is a fortran program, look in xcom_code)
Dens=xDens, output the density of the substance
subst=Csubst, ouput the string name of the Substance
CALLED BY:
HESI_MENU, PROCESS_XCOM_GD
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
You *MUST* have the FORTRAN Code, define the system logical
xcom_code to be the directory containing FORTRAN code
Never tested on a UNIX implementation of IDL or FORTRAN,
Tested up to DEC Alpha VMS 6.2. There will most
likely be problems with calling the element data files in UNIX!
If there is a demand, the GSFC SDAC may be able to port the code
PROCEDURE:
Call this procedure standalone or use HESI_MENU
MODIFICATION HISTORY
Written by Eric Carzon 1992
Major modifications KT April 94
EAC modifications for Brian Dennis, 12/94
include Fractional Attenuation from i
incident beam (1 - fractional transmission)
as a plot option
allowed use of a grid (works best in log, log) for minor
tick marks (ie a logarithmic, base 10, grid to find points
on the plot)
set automatic densities for elements
fixed ability to enter compounds
EC finished modifications in Feb. 95, including density and substance
output only keywords for use with HESI proposal graphics software
EC 6/10/96, header documentation