Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://hea-www.harvard.edu/PINTofALE/papers/lkd_2004_itcc.ps.gz
Äàòà èçìåíåíèÿ: Sat Jan 24 18:19:31 2004
Äàòà èíäåêñèðîâàíèÿ: Sat Dec 22 01:45:46 2007
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: extreme ultraviolet
Package for the Interactive Analysis of Line Emission: Markov­Chain and
Monte Carlo Methods
LiWei Lin, Vinay L. Kashyap, Jeremy J. Drake
Smithsonian Astrophysical Observatory
60 Garden St., Cambridge, MA 02138
pintofale@head.cfa.harvard.edu
Abstract
We describe the implementation of Monte Carlo meth­
ods in the Package for Interactive Analysis of Line Emis­
sion (PINTofALE), which is a collection of IDL­based pro­
grams designed to analyze astrophysical spectra. We use
Monte Carlo based methods to determine errors in spectral
line parameters, and use Markov­Chain Monte Carlo meth­
ods to construct emission measure distributions which sum­
marize the structure of the coronae of stars. We present ex­
amples of how the algorithms are used and discuss some
planned updates.
1. Introduction
The Package for Interactive Analysis of Line Emission
(PINTofALE; Kashyap & Drake [17]) was developed for
the analysis of line emission from stellar coronal plasma. 1
Most normal stars have hot atmospheres at temperatures of
1­10 MK that emit optically thin thermal radiation in the
extreme­UV and X­ray wavelength range. The spectra are
dominated by line emission from highly ionized species of
abundant Fe, O, Ne, etc., as well as continuum emission
from free­free (Bremsstrahlung) and free­bound radiation.
Analysis of such spectra requires access to the innards of
atomic line databases as well as flexible tools for interac­
tive modeling. PINTofALE is a collection of modular rou­
tines written in IDL 2 . IDL is a versatile scripting language
used extensively by astrophysicists, and provides for the de­
velopment of both command­line driven and GUI based ap­
plications. The PINTofALE routines provide easy access to
pre­compiled atomic databases and perform basic spectral
1 See http://hea­www.harvard.edu/PINTofALE/, where
PINTofALE is described in detail, and from where the software can
be freely downloaded.
2 Interactive Data Language TM , developed by Research Systems Inc.,
of Boulder, CO.
analysis tasks such as line identification, profile fitting, and
the creation of synthetic spectra.
Here we present several implementations of Monte Carlo
methods in PINTofALE. The most sophisticated of these is
a Markov­Chain Monte Carlo (MCMC) analysis package
geared towards the problem of reconstructing Differential
Emission Measures (DEMs). DEMs describe the ``amount
of material'' contributing to coronal emission at a given
temperature, and are thus a key probe of coronal struc­
ture. DEM reconstruction via MCMC allows confidence
bound estimation, automatic de­blending of lines, use of
robust data such as line ratios, and avoids non­physical
smoothness constraints which other methods are prone to.
We demonstrate these capabilities by performing DEM re­
construction on a synthetic Chandra/HETG spectrum gener­
ated using a known DEM. Monte Carlo and MCMC meth­
ods have attained increasing popularity in a diverse range
of scientific endeavor in both industrial and academic ap­
plications. Their acclaim is well­deserved, as they, together
with exponentially growing and affordable computational
power, provide a means for efficient sampling of compli­
cated high dimensional parameter spaces, allowing scien­
tists to probe data with increasingly sophisticated models,
and tackle problems previously considered intractable. Here
we begin by giving a cursory overview of some basic con­
cepts in coronal plasma physics in x2. This will serve both
to illuminate the context in which analysis software such
as PINTofALE is necessary, as well as provide a platform
from which we can discuss the problem of DEM reconstruc­
tion. In x3, we describe the general structure of PINTofALE.
Then in x4, we describe the implementation of some Monte
Carlo based techniques in PINTofALE, and summarize the
application of these implementations in x5.
2. Coronal Plasma and Emission Measure
Analysis
Most normal stars, including the Sun, have hot outer
atmospheres where temperatures range from 10 5 K to >

Figure 1. A high resolution (Chandra) spec­
trum of Capella. The co­added MEG spec­
trum from an ACIS­S/HETG observation is
shown as the shaded gray region from 11
to 17 angstroms. The dashed lines point to
the locations of some astrophysically impor­
tant lines. These are labeled with the ionic
species responsible for the transition.
10 7 K and the density is typically 10 9 10 12 cm 3 . Such
conditions give rise to highly ionized elements, and colli­
sionally dominated optically thin emission which peaks in
the X­ray range. At temperatures above  10 6 K the spec­
trum is dominated by emission from H­like and He­like
species of the most abundant elements (O, Si, Mg, Ne, Ar,
S, Fe, N, and C), and by continuum energy losses. The high
spectral resolution available on the current generation of
X­Ray satellites (e.g. Chandra, and XMM­Newton) brings
numerous plasma diagnostics within reach that were un­
available with low­spectral­resolution data from previous
missions such as Einstein, ROSAT, ASCA, etc. As an il­
lustration of the rich spectral data available, we show a
Chandra/HETG spectrum of the active spectroscopic binary
Capella ( Aur) in Figure 1, where some of the stronger H­
like and He­like emission lines are identified and labeled.
An individual emission line is characterized by its iden­
tification (i.e., the ionic species from which it originates,
and the quantum levels that define the transition itself),
the energy of the transition (the wavelength, usually in
š
A), the intensity (usually in counts per bin or flux in pho­
tons cm 2 s 1 ), and the shape of the profile (which is a
combination of intrinsic shape, thermal and Doppler broad­
ening, and instrumental broadening). Of particular interest
is the integrated flux of these lines or what the ratios of the
fluxes of some interesting lines can tell us about the phys­
ical properties of the coronal plasma under scrutiny ­ tem­
perature structure, electron density, and relative abundances
of elements.
A formalism to address such questions was first de­
veloped by Pottasch [21] for UV analysis of the solar
corona, and later by Jefferies e.g. Orral & Zirker [12], With­
broe [26], Jordan [13] and Craig & Brown [6]. For a transi­
tion u ! l the intensity is given by
I ul = AK ul
Z
T
G ul (n e ; T )n 2
e d V (T ) (1)
where A is the elemental abundance relative to
H,G ul (n e ; T ) are the atomic emissivities or line cool­
ing functions which represent the response of the intensity
of a given transition at a given temperature T and elec­
tron density n e , K ul is a constant factor that takes into ac­
count the energy of the transition and the distance to the
source, n 2
e d V (T ) is the Emission Measure, which indi­
cates the amount of material existing at a given temperature,
and d V (T ) is the volume occupied by the plasma at tem­
perature T. Compilations of atomic data are available from
databases such as CHIANTI (Dere et al. [7]), SPEX (Kaas­
tra et al. [15]), and APED (Brickhouse et al. [3], Smith et
al. [25]).
If we ignore the slight density sensitivity in the line cool­
ing function and integrate over T rather than volume, we
can recast the equation as:
I ul = AK ul
Z
T
G ul (T )n 2
e
d V (T )
d T d T (2)
where we define the Differential Emission Measure:
DEM(T ) = n 2
e
d V (T )
d T : (3)
With the availability of high resolution spectra from
Chandra and XMM­Newton, much effort has been geared
towards the development of DEM reconstruction methods.
Given line fluxes observed for N different lines for which
G ul (n e ; T ) can be calculated, and given adequate temper­
ature coverage by these line cooling functions, one obtains
a system of N integral equations for which the DEM is an
unknown kernel and the abundances must be derived. This
is an instance of Fredholm's equation of the first type, and
straightforward inversion poses well­known mathematical
difficulties. For instance, the solution is non­unique and is
subject to high­frequency instability. We avoid these issues
by forward fitting, i.e., deriving a best­fit solution with er­
rors, and imposing physics­based smoothness constraints.
The DEM reconstruction problem has been ad­
dressed by several authors using Singular Value De­
composition (Schmitt et al. [24]), spline curve fitting
(Brosius et al. [4]), and fitting with Chebychev polyno­
mials (Schmitt & Ness [23]), amongst others (Kaastra
et al. [15]); see Judge, Hubeny, & Brown [14] for a cri­
tique of the process.

We present here a DEM reconstruction algorithm based
on a Markov­Chain Monte Carlo reconstruction method de­
veloped by Kashyap & Drake [16]. We demonstrate this
method below (see x4.3) on a synthetic Chandra/HETG
spectrum generated with PINTofALE routines.
3. Package for Interactive Analysis of Line
Emission: Creation of Synthetic spectra
PINTofALE is a software suite of modularized IDL rou­
tines geared towards, but not limited to, the analysis of coro­
nal plasma line emission. The mission of the project is to
fuse the otherwise disparate and various atomic database
and data analysis packages necessary for high energy spec­
tral analysis into one transparent, flexible, and freely avail­
able software package. The collection of PINTofALE rou­
tines can be roughly grouped by function as follows:
 Atomic Database Compilation and Data Mining:
PINTofALE's atomic data base compilation routines
interact with atomic line databases (external to PINTo­
fALE), to compute and compile wavelengths and emis­
sivities for available transitions that are then stored in
a virtual catalog for quick retrieval. Data Mining rou­
tines retrieve the pre­compiled data flexibly and on de­
mand. Currently supported atomic line databases in­
clude CHIANTI, APED, and SPEX.
 Analysis: Core analysis routines allow the user to in­
teractively analyze emission line spectra via both
GUI­based and command line based routines. They
perform the basic analysis tasks required. For in­
stance, PICKRANGE() allows 'spectral browsing',
or dynamic mouse­controlled changing of wave­
length regimes on an intensity v/s wavelength plot;
LINEID() is a GUI­based line identification pro­
gram; FITLINES() allows GUI­based interactive
model fitting of individual or multiple emission fea­
tures with Gaussian, Lorentzian, or other functions;
MIXIE() is a command­line--based routine which
can identify possible blends of interesting lines and re­
turn correction factors for their measured fluxes, etc.
Other routines in this category perform tasks such as
Levenberg­Marquardt least square minimization, cal­
culation of interstellar absorption, and convolution of
model spectra with instrumental line response func­
tion.
 Utilities: PINTofALE's utilities are designed to aid
in miscellaneous functionality that are not specific to
spectral analysis but are likely to be of interest to a
general user. Examples of this include a compilation
of fundamental constants (INICON), histogram gen­
eration (HASTOGRAM()), re­binning into an arbitrary
binning while conserving flux (REBINW()), placing
labels on plots (PLOTID), fitting functions to data
(FIT LEVMAR), etc.
The steps necessary to create a simulated spectrum with
PINTofALE are as follows:
1. INITALE: Initialize the stellar coronal parame­
ters electron density n e , abundances A(Z), and ab­
sorption column density NH .
2. MK DEM() : Set the initial Differential Emis­
sion Measure
3. RD LINE() and RD CONT() : load the atomic line and
continuum emissivities
4. FOLD IONEQ() : fold ion balance calculations into
line emissivity functions
5. LINEFLX(): compute continuum and line fluxes by in­
tegrating the emissivities, weighted by the DEM, over
temperature.
6. ISMTAU(): correct for interstellar absorption
7. RDARF() : read in the instrument effective area
8. HASTOGRAM() : bin the line and continuum fluxes
9. add line and continuum spectra, weighted by effective
area
10. CONV RMF : Convolve the predicted flux spectrum
with instrumental response matrix and multiply by ex­
posure time to get a predicted counts spectrum.
Though one may argue that preparing the different mod­
ules can be a time consuming project, one must note that
this modularization makes PINTofALE highly flexible and
offers the user true hands on control of the analysis, rather
than produce a `black box' package that will invariably be
misused because of its complexity. Nevertheless, for such
common tasks as creation of a synthetic spectrum that may
require the orchestration of an array of PINTofALE routines
in a repeatable and well­understood manner, PINTofALE
also includes the option of using pre­packaged scripts which
run the routines in a batch to perform a required task. The
script XMMS epic rgs ao3.par is an example: it allows
the user to create a synthetic XMM/RGS spectrum by sim­
ply toggling the relevant parameters in the script header.
4. Monte Carlo methods in PINTofALE
4.1. Monte Carlo Error Estimation
Error estimation via Monte Carlo is an efficient tool with
which we determine the confidence bounds on model pa­
rameters in those cases where the fits involve prohibitively
large numbers of parameters. Propagating errors for large
parameter sets and handling it analytically or even numer­
ically, especially when considering strong correlations that

Figure 2. Sample fits of the heavily blended
Ne IX region. Plotted over the spectrum
(stepped histogram with error bars shown as
vertical bars) are the continuum level (hori­
zontal line), four Gaussian profiles for each
line, and a composite of the five components.
The fits were made using PINTofALE 's GUI­
based line fitting software. Error analysis of
such fits requires attention to strong correla­
tions between the modeled integrated fluxes
of the individual lines.
may exist between parameters (when covariance terms be­
come important), may require an expert's knowledge of an
array of statistical techniques that apply differently to dif­
ferent cases.
To illustrate, we use a simple example pertinent to our
discussion of emission line spectroscopy. In Figure 2, we
show a region of the Chandra/HETG spectrum of Capella
(Figure 1) where we have identified a strong resonance
line from Ne IX and 3 contaminant lines originating from
Fe XIX. A Gaussian profile is assigned to each of the four
lines, each having 3 parameters: width, position, and flux.
Together with a continuum level, they give a composite
curve with which to fit the observed counts spectrum in this
wavelength region. The NeIX resonance line is part of a
temperature­sensitive diagnostic, and measuring its flux ac­
curately is generally of prime importance. Even after ap­
plying all known constraints, e.g., the widths of all the
lines may be approximated by the instrument width, and
line positions are quite well determined by referring to the
atomic database, this situation presents a challenge to clas­
sical model fitting methods. Further, if we are to require re­
liable errors on the fit parameters, we must also account for
the fact that because the profiles are so heavily blended with
each other, their fluxes are strongly correlated. Thus, rather
than proceeding with the task analytically, we take a Monte
Carlo approach. Adhering to a method described in detail
by Press et al. [22], we:
1. create N synthetic data sets by varying the true data set
randomly within its observed error
2. fit the N synthetic data sets in the same way that the
original data set was analyzed, achieving N fitted sets
of fluxes
3. characterize the uncertainty in our original fit by ob­
serving how the N sets of fluxes achieved synthetically
are distributed about the original parameters. We may
do this, e.g., by delineating confidence bounds with a
 2 statistic, or by measuring a confidence width in pa­
rameter space by counting simulated parameters start­
ing from the true fit out towards a required confidence
(e.g. 68% or 90%).
We have incorporated this method of error analysis in
PINTofALE's GUI based line fitting software. Prelimi­
nary tests of the method on single line fits (non­correlated
parameters) give results which are largely in agree­
ment with standard error computation methods.
4.2. Model Optimization with Markov Chain
Monte Carlo
In general terms, the task of the astrophysicist often is to
optimize a parameterized model to an observed data set to
infer physically meaningful quantities with maximum con­
fidence given the quality of the data. Given say, m data
points D = fD i ; i = 1:::mg each with its associated error,
and a proposed model with N parameters,  = f  ;  =
1:::Ng, the task is to find that  which best models the
data according to some specified merit function. Put an­
other way, we seek to maximize the probability of observ­
ing parameters D given a model , by assessing for exam­
ple P (Dj) = exp( 1=2
P m
i=1 ((D i obs D i mod )= i obs ) 2 )
for different sets of , with D i mod being the data set calcu­
lated using the model evaluated for , to compare with an
observed data set D i obs with associated error  i obs .
It is often the case that one may proceed fruitfully by em­
ploying standard methods such as Levenberg­Marquardt
minimization, which calculates gradients in parame­
ter space to use as a guide in an iterative stepping process
towards areas of high likelihood, after which a solu­
tion to the N dimensional problem is approximated. Such
a process can however become ill­suited if one encoun­
ters a problem with a relatively large number of parame­
ters characterizing the model for a middling number of data
points.
In an ideal world, where computational power is no ob­
ject, one can envision that such complex parameterized

problems can be solved by a brute force Monte Carlo pro­
cess. A copious amount of sets  can be randomly gener­
ated and could sample a merit function in N dimensional
parameter space with resolution adequate to not only give a
good estimate of the best probability set  but also the pro­
jected confidence or credible bounds in the ascertained pa­
rameters. Realistically, a Monte Carlo approach would re­
quire some sort of conditioning mechanism to make those
few simulations which are computationally tractable to ac­
tually count. A Markov Chain is exactly such a mechanism.
A Markov chain is an ordered sequence of random variables
(in our case parameter sets),  0 ;  1 ; 2; :::; in which the
likelihood that a certain set  i+1 appear in the sequence
is directly dependent only on  i . Put in terms of condi­
tional probabilities: P( j+1 j j ; ::: 0 ) = P( j+1 j i ). A
set of transition rules can be adopted to govern the evo­
lution of variables within such a sequence, For example,
we adopt two such transition rules: First, the candidates for
the next parameter set  ? in sequence are obtained as Nor­
mal deviates of the current parameter set :  ? =  + r
where r is a random number and  is an estimate of the
variance of ; and second, the Metropolis criterion [19],
where candidate parameter sets are adopted with a proba­
bility A(;  ? ) = min[1; P (Dj ? )
P (Dj) ], i.e. a new parameter
set is sometimes adopted even if its associated probability
is smaller than that of the previously adopted set, a tactic de­
signed to avoid having the solution get bogged down in lo­
cal minima.
The discerning nature of the Markov Chain coupled with
the randomized search of the Monte Carlo provides a com­
putationally feasible method to harness the power of Monte
Carlo. The `random walk' nature of the MCMC approach
allows the algorithm to probe regions of parameter space
which might otherwise be ignored (e.g.,  2 minimization
routines often follow the steepest gradients in parameter
space, not necessarily the gradient leading to the deepest
valley). Moreover, simulations are run in batches, assur­
ing adequate sampling of local parameter space, and would
make apparent any non­uniqueness in the parameter solu­
tion. For a review of MCMC methods see Neal [20].
A generalized fitting engine employing MCMC is in the
process of being built and incorporated into PINTofALE.
In the following, we describe one instance of such an al­
gorithm, one developed specifically to address the issue of
stellar coronal DEMs (see x2).
4.3. Markov­Chain Monte Carlo DEM Recon­
struction
In the language used to describe MCMC above, the DEM
reconstruction problem is to maximize the probability of a
modeled DEM and abundances given a set of measured line
or continuum fluxes or flux ratios. That is, the task is to as­
sess a merit function P (Dj) = exp( 1=2
P m
i=1 ((I i obs
I i mod )= i obs ) 2 ) where  is a parameter set used to model
the DEM, I i obs are measured fluxes with associated error
 i obs , and I i mod are model fluxes calculated with Eq 1 using
a DEM model evaluated for  and using emissivity curves
from an atomic database. 3 Note that the exponent is just the
well known expression for  2 .
There are several approaches to how one can parame­
terize the DEM. These can be grouped into two general
categories: continuous models which parameterize using a
few control parameters (e.g. splines or Chebychev poly­
nomials) and discrete models, where the DEM is an array
of N temperature bins, giving essentially N model parame­
ters (e.g. Singular Value Decomposition, the Regularization
Method, genetic algorithms). Continuous models truncate
the number of free parameters, thereby making the prob­
lem tractable for common minimization techniques (e.g.
Levenberg­Marquardt). Their major drawback however is
that assuming a functional form can impose non­physical
constraints on the shape of the DEM. Also, probing a pa­
rameter space with standard  2 minimization techniques is
prone to find local minima and will sometimes incur pa­
rameter degeneracy and non­unique solutions. The major
advantage of a discretized parameterization is that it can
approximate both continuous and discontinuous functional
forms for the DEM. Its ability to do so however, depends
on how fine one is willing to define the binning scheme
and what constraints one places on the smoothness of the
final solution. One can imagine for example, a DEM de­
fined between Log(T ) = 5:5 and Log(T ) = 7:8 dis­
cretized with modest 0:1 dex bins will give 23 free pa­
rameters. Such a parameterization is intractable with e.g.,
Levenberg­Marquardt, as the number of data points avail­
able is generally limited to the ' 10 strong emission lines
and/or flux ratios available in the spectra.
Kashyap & Drake [16] offer the latter approach to DEM
reconstruction problem using a Markov­Chain Monte Carlo
process. Their approach is now made available via the
PINTofALE procedure MCMC DEM. The procedure is highly
flexible, offering the user a range of inputs allowing users
to control the number of simulations, specify line ratios, al­
low different types of smoothing, censor data points (i.e.,
use upper and lower limits), etc. The output of the simula­
tions are stored and are an ideal resource to characterize the
uncertainty in the reconstructions.
It is important to realize that the MCMC algorithm im­
plemented here cannot be used as a black box. While highly
flexible and capable of addressing almost any type of as­
3 It is possible to use other statistics, such as Cash or Castor [5] to de­
termine the likelihoods in the Poisson regime. However, the e
1
2  2
statistic used here by default is the best choice for DEM analysis, since
the fluxes input for analysis are usually in intensity units (not photon
counts) and are also background subtracted.

Instrument Effective Area
Line Identification
RECONTRUCTED
DEM
Line Fitting
INPUTS FOR DEM ANALYSIS
Atomic Database
ABUNDANCES
Number
Atomic
State
Ionic
Wavelength
Observed
Spectrum
Wavelength Grid
User Input
=
MCMC Analysis
Observed Flux
Electron Density
Wavelength Ranges
Continuum Emissivities
Theoretical Wavelengths
Line Emissivities
Figure 3. Data flow chart of input param­
eters required for MCMC DEM(). The direc­
tion of the arrows correspond to the direc­
tion of the data flow. Square rectangles indi­
cate user inputs. Hexagons indicate analysis
using PINTofALE software. Rounded rectan­
gles indicate substantial analysis operations
which have been generally encoded as stand­
alone routines in PINTofALE . Rounded rect­
angles indicate analysis products.
tronomical dataset, it does require of the user a measure
of understanding of the process. This is the first algorithm
of its kind made generally available to the astronomical
community: there is no other DEM reconstruction method
that computes uncertainties as a matter of course, nor one
so general, and no MCMC based reconstruction algorithm.
The complexity of the algorithm can be seen in the data
flow diagram setting up the input to MCMC DEM (Figure 3)
and the data flow diagram of the MCMC DEM reconstruc­
tion algorithm itself (Figure 4). This process is of course
also subject to yet more systematic uncertainties that arise
from an imperfect knowledge of the underlying atomic data
and the approximations made to the physics of the source
(see Judge et al. [14], Kashyap & Drake [16]).
MCMC DEM Reconstruction
Correction for Line Blends
Wavelengths Ranges
Continuum Emissivities
Line Identifications
Line Emissivities
Wavelengths
Observed Fluxes and/or Ratios Theoretical Fluxes and/or Ratios
Update DEM and/or Abundances
Metropolis
Done with Sims?
Yes
No
Observed Line Fluxes
Observed Continuum Fluxes
Theoretical Fluxes
User Input
=
Update Abundances
Flux Ratio Specification
Best Solution + Uncertainties
Updated Parameters ( DEM and/or Abundances
Initial Guess
Figure 4. Data flow chart depicting the DEM
realization process within MCMC DEM(). The
direction of the arrows indicate the direc­
tion of the data flow. Square rectangles in­
dicate user inputs. Rounded rectangles indi­
cate a computational result. Diamonds indi­
cate a logic gate.
5. Application and Summary
We have tested the PINTofALE procedure MCMC DEM
exhaustively, both on synthetic spectra as well as actual
high­resolution spectral data. One such test is shown as an
example here. We first compute a synthetic spectrum af­
ter adopting an arbitrary DEM with a double Lorentzian
structure (maxima at 10 6:6 K and 10 7 :1 K; see Figure 5).
The spectrum is generated assuming solar abundance val­
ues (Grevesse & Sauval [11]). From this spectrum, a set of
lines from H­like and He­like species were identified (us­
ing LINEID()). Lines from some of the most abundant
species, O, Ne, Mg, Si, and S were chosen because they
are relatively strong and their atomic data are the most reli­
able and well understood. Using PINTofALE, we identified
a set of 24 of these lines and measured line fluxes by fit­

Figure 5. The reconstructed DEM distribution
compared with the original. The original is
plotted with a thick, dashed black line. In the
top panel, the uncertainty in the DEM is dis­
played by plotting simulated emission mea­
sures within one sigma of the best value for
each bin.
ting Gaussian profiles (FITLINES()) and correcting for
the instrument effective area. We then set up the MCMC
analysis (see Figure 3) by reading in the appropriate emis­
sivities.
We ran an abundance invariant DEM reconstruction
analysis using H­like/He­like ratios of lines from common
elements (e.g. O VII/O VII, Ne IX/Ne X, Fe VIII/Fe VII
etc.)(Drake et. al. [9]. A smoothing scale derived inter­
nally based on the widths of the emissivity functions was
used to damp out the high­frequency oscillations inher­
ent in this type of integrals (Equation 2; this is a Fred­
holm integral of the 1 st kind). In a preliminary analysis,
we run 500 simulations, which required around 7 min­
utes with an AMD Athlon 1800 Mhz processor.
The result of the reconstruction are shown as the shaded
band in Figure 5, where the width of the band tracks the un­
certainty in the DEM. All the simulated DEMs within the
1­ level are shown. We can also characterize the uncer­
tainty by plotting the 50% most probable DEMs (Figure 6).
Both Figure 5 and Figure 6 were made with MCMC PLOT
an accessory routine to MCMC DEM).
This MCMC based DEM reconstruction technique has
also been applied to the analysis of many X­ray active stars:
Drake et al. [8] have applied it to  Boo A, Maggio et al. [18]
to solar analogs AD Leo and  1 UMa, Argiroffi et al. [1]
to Capella ( Tau), Ball et al. [2] to  UMa, and Garcia et
al. [10] to AB Dor and V471Tau, all using beta versions of
Figure 6. The reconstructed DEM distribution
compared with the original. The uncertainty
in the DEM is displayed by plotting all DEM
realizations with the shade of grey indicating
the probability associated with each. Darker
shades indicate a better probability.
PINTofALE MCMC software. 4
In summary, we have made a major upgrade to the
PINTofALE suite of routines designed to facilitate the anal­
ysis of high­resolution spectral data. These will be made
publicly available as PINTofALE v2 on April 7, 2004. The
most significant improvements have been the addition of
Monte Carlo based methods, all of which are aimed at pro­
viding better error bars for complex fitting problems, in­
cluding the classically intractable problem of placing confi­
dence bounds on reconstructed DEMs.
Acknowledgments: This work was supported by the AISR
grant NAG5­9322. VLK and JJD also acknowledge support
from NASA grants to the Chandra X­ray Center. We are
grateful for extensive and useful discussions with Antonio
Maggio, David Garcia­Alvarez, William Ball, Paola Testa,
and Costanza Argiroffi.
References
[1] C. Argiroffi, A. Maggio, and G. Peres. On coronal struc­
tures and their variability in active stars: The case of Capella
observed with Chandra/LETGS. Astronomy & Astrophysics,
404:1033--1049, June 2003.
[2] W. Ball, J. Drake, L. Lin, and V. Kashyap. Stellar Coronal
Abundnaces at Intermediate Activity Levels: UMa. To be
submitted to the Astrophysical Journal .
4 A guide to using MCMC DEM is available online at http://hea­
www.harvard.edu/PINTofALE/doc/MCMC DEM. html.

[3] N. S. Brickhouse, R. K. Smith, and J. C. Houck. Spec­
troscopic Data for Modeling Highly Ionized Astrophysical
Plasmas. Bulletin of the American Astronomical Society,
31:736--+, Apr. 1999.
[4] J. W. Brosius, J. M. Davila, R. J. Thomas, and B. C.
Monsignori­Fossi. Measuring Active and Quiet­Sun Coro­
nal Plasma Properties with Extreme­Ultraviolet Spectra from
SERTS. Astrophysical Journal Supplement, 106:143--+,
Sept. 1996.
[5] W. Cash. Parameter estimation in astronomy through ap­
plication of the likelihood ratio. Astrophysical Journal,
228:939--947, Mar. 1979.
[6] I. J. D. Craig and J. C. Brown. Fundamental limitations of
X­ray spectra as diagnostics of plasma temperature structure.
Astronomy & Astrophysics, 49:239--250, June 1976.
[7] K. P. Dere, E. Landi, H. E. Mason, B. C. Monsignori Fossi,
and P. R. Young. CHIANTI ­ an atomic database for emis­
sion lines. A&A Supplement Series, 125:149--173, Oct. 1997.
[8] J. J. Drake and V. Kashyap. The Coronal Metallicity of the
Intermediate Activity Dwarf  Bootis A. Astrophysical Jour­
nal, 547:428--436, Jan. 2001.
[9] J. Drake et. al. . in preperation, 2004.
[10] D. Garcia, J. Drake, L. Lin, and V. Kashyap. The Coronae
of AB Dor and V471 Tau: Primordial angular momentum vs
tidal spin­up. To be submitted to the Astrophysical Journal.
[11] N. Grevesse and A. J. Sauval. The solar abundance of iron
and the photospheric model. Astronomy & Astrophysics,
347:348--354, July 1999.
[12] J. T. Jefferies, F. Q. Orrall, and J. B. Zirker. The Interpreta­
tion of Total Line Intensities from Optically Thin Gases. I: A
General Method. Solar Physics, 22:307--+, 1972.
[13] C. Jordan. The structure and energy balance of solar active
regions. Royal Society of London Philosophical Transac­
tions Series A, 281:391--404, May 1976.
[14] P. G. Judge, V. Hubeny, and J. C. Brown. Fundamental Lim­
itations of Emission­Line Spectra as Diagnostics of Plasma
Temperature and Density Structure. Astrophysical Journal,
475:275--+, Jan. 1997.
[15] J. S. Kaastra, R. Mewe, D. A. Liedahl, K. P. Singh, N. E.
White, and S. A. Drake. Emission measure analysis meth­
ods: the corona of AR Lacertae revisited. Astronomy & As­
trophysics, 314:547--557, Oct. 1996.
[16] V. Kashyap and J. J. Drake. Markov­Chain Monte Carlo Re­
construction of Emission Measure Distributions: Application
to Solar Extreme­Ultraviolet Spectra. Astrophysical Journal,
503:450--+, Aug. 1998.
[17] V. Kashyap and J. J. Drake. PINTofALE : Package for the in­
teractive analysis of line emission. Bulletin of the Astronom­
ical Society of India, 28:475--476, June 2000.
[18] A. Maggio, J. J. Drake, V. Kashyap, G. Micela, S. Sciortino,
G. Peres, F. R. Harnden, and S. S. Murray. AD Leo ob­
served with Chandra LETG: emission measure distribution
density, and element abundances of the coronal plasma. In
ASP Conf. Ser. 277: Stellar Coronae in the Chandra and
XMM­NEWTON Era, pages 57--+, 2002.
[19] N. Metropolis, A. Rosenbluth, M. Rosenbluth, A. Teller,
and E. Teller. Simulated Annealing. Journal of Chemical
Physics, 21:1087--1092, 1953.
[20] R. Neal. Probabilistic inference using markov chain monte
carlo methods. Technical report, Dept. of Computer Science,
University of Toronto, 1993.
[21] S. R. Pottasch. The Lower Solar Corona: Interpretation of
the Ultraviolet Spectrum. Astrophysical Journal, 137:945--
+, Apr. 1963.
[22] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flan­
nery. Numerical Recipes in C++ The Art of Scientific Com­
puting. Cambridge University Press, 2002.
[23] J. Schmitt and J.­U. Ness. Coronal abundances from high­
resolution X­ray data: The case of Algol. Astronomy & As­
trophysics accepted.
[24] J. H. M. M. Schmitt, J. J. Drake, R. A. Stern, and B. M.
Haisch. The Extreme­Ultraviolet Spectrum of the Nearby K
Dwarf epsilon Eridani. Astrophysical Journal, 457:882--+,
Feb. 1996.
[25] R. K. Smith, N. S. Brickhouse, J. C. Raymond, and
D. A. Liedahl. First Results from APEC: The Spectra of
Collisionally­Excited Plasmas. Bulletin of the American As­
tronomical Society, 31:735--+, Apr. 1999.
[26] G. L. Withbroe. The analysis of XUV emission lines. Solar
Physics, 45:301--317, Dec. 1975.