3.1.9. DEM: differential emission measure analysis¶
3.1.9.1. Overview¶
SPEX offers the opportunity to do a differential emission measure analysis. This is an effective way to model multi-temperature plasmas in the case of continuous temperature distributions or a large number of discrete temperature components.
The spectral model can only have one additive component: the DEM component that corresponds to a multi-temperature structure. There are no restrictions to the number of multiplicative components. For a description of the DEM analysis method see document SRON/SPEX/TRPB05 (in the documentation for version 1.0 of SPEX), Mewe et al. (1994), Mewe et al. (1995) and Kaastra et al. (1996).
SPEX has 5 different dem analysis methods implemented, as listed shortly below. We refer to the above papers for more details.
reg – Regularization method (minimizes second order derivative of the DEM; advantage: produces error bars; disadvantage: needs fine-tuning with a regularization parameter and can produce negative emission measures.
clean – Clean method: uses the clean method that is widely used in radio astronomy. Useful for “spiky emission measure distributions.
poly – Polynomial method: approximates the DEM by a polynomial in the
plane, where
is the emission measure. Works well if the DEM is smooth.
mult – Multi-temperature method: tries to fit the DEM to the sum of Gaussian components as a function of
. Good for discrete and slightly broadened components, but may not always converge.
gene – Genetic algorithm: using a genetic algorithm try to find the best solution. Advantage: rather robust for avoiding local subminima.Disadvantage: may require a lot of cpu time, and each run produces slightly different results (due to randomization).
In practice to use the DEM methods the user should do the following steps:
Read and prepare the spectral data that should be analysed
Define the dem model with the “comp dem” command
Define any multiplicative models (absorption, redshifts, etc.) that should be applied to the additive model
Define the parameters of the dem model: number of temperature bins, temperature range, abundances etc.
Give the “dem lib” command to create a library of isothermal spectra.
Do the dem method of choice (each one of the five methods outlined above)
For different abundances or parameters of any of the spectral components, first the “dem lib” command must be re-issued!
3.1.9.2. Syntax¶
The following syntax rules apply:
dem lib
: Create the basic DEM library of isothermal spectradem reg auto
: Do DEM analysis using the regularization method,
using an automatic search of the optimum regularization parameter. It
determines the regularisation parameter dem reg auto #r
: As above, but for the scaling factor dem reg #r
: Do DEM analysis using the regularization method,
using a fixed regularization parameter dem chireg #r1:#r2 #i
: Do a grid search over the regularization
parameter dem clean
: Do DEM analysis using the clean methoddem poly #i
: Do DEM analysis using the polynomial method, where
#i is the degree of the polynomialdem mult #i
: Do DEM analysis using the multi-temperature method,
where #i is the number of broad componentsdem gene #i1 #i2
: Do DEM analysis using the genetic algorithm,
using a population size given by #i1 (maximum value 1024) and #i2 is
the number of generations (no limit, in practice after
dem read #a
: Read a DEM distribution from a file named #a which
automatically gets the extension “.dem”. It is an ascii file with at
least two columns, the first column is the temperature in keV and the
second column the differential emission measure, in units of
dem save #a
: Save the DEM to a file #a with extension “.dem”. The
same format as above is used for the file. A third column has the
corresponding error bars on the DEM as determined by the DEM method
used (not always relevant or well defined, exept for the
regularization method).dem smooth #r
: Smoothes a DEM previously determined by any DEM
method using a block filter/ Here #r is the full width of the filter
expressed in 3.1.9.3. Examples¶
dem lib
: create the DEM librarydem reg auto
: use the automatic regularization methoddem reg 10.
: use a regularization parameter of dem chireg 1.e-5:1.e5 11
: do a grid search using 11
regularisation parameters dem clean
: use the clean methoddem poly 7
: use a 7th degree polynomial methoddem gene 512 128
: use the genetic algorithm with a population of
512 and 128 generationsdem save mydem
: save the current dem on a file named mydem.demdem read modeldem
: read the dem from a file named modeldem.demdem smooth 0.3
: smooth the DEM to a temperature width of 0.3 in