Home
SPEX User's Manual
Contents
1. 49 3 3 Bb Blackbody model 2 pee eee 49 3 4 Cf isobaric cooling flow differential emission measure model 51 3 5 Cie collisional ionisation equilibrium model o 51 35 1 Temperatures c ine s kx m x 46 244 XR b e ROG Ron ow RO ERS P 51 9 5 2 Line broadening escri b Rr EG Bk 9 RR 52 3 5 3 Density effects ssu s a 22e 52 3 5 4 Non thermal electron distributions 0 00004 0G 52 309 JDUnAH6GeS s ery do a a o Eque y da ge 52 3 5 6 Parameter description s 53 3 6 Dbb Disk blackbody model eh 53 3 7 Delt delta line model e 54 3 8 Dem Differential Emission Measure model 55 3 9 Dust dust scattering model 222 55 3 10 Etau simple transmission model 2 0 ee 56 3 11 Euve EUVE absorption model 0 0 0 00002 eee eee 56 3 12 File model read from a file aae e o A 57 3 13 Gaus Gaussian line model 21222 a os ew Romo ee 57 3 14 Hot collisional ionisation equilibrium absorption model 58 3 15 Knak segmented power law transmission model 58 3 16 Laor Relativistic line broadening model len 59 3 17 Lpro Spatial broadening model s s s e s se e s e 59 3 18 Mbb Modified blackbody model s so sge dos a ea ant data asa o 60 3 19 Neij Non Equilibrium lonisation Jump model lcs 61 3 20 Pdem DEM models ae so r emco ss 61
2. 0 2 ee 106 5 7 Proposed file formats 2 2 les 107 5 7 1 Proposed response format oaoa 107 5 7 2 Proposed spectral file format s 109 5 8 examples 4 22e oo o RO ge a ud JR Ae Reds noe Rod E ORE Re Yoko sas 111 5 8 1 Introduction ios o 22 24 Rc moy e Y Rod 45 bo Pea PR E es 111 55 2 WROSat Or Co sak sert RR E 112 6 CONTENTS ME VIO ONINDEPMPLTETIPPC x 112 584 XMM RGS data sie css neo be wee ee ee eas 115 5 9 References s p rs 2 o4 68a 2e EORR ER eee FOR R SO Rom ee ee 116 6 Installation and testing 119 6 1 Testing the software sa s se mee aa ee 119 7 Acknowledgements 121 7 1 Acknowledgements ooo ss 121 Chapter 1 Introduction 1 1 Preface At the time of releasing version 2 0 of the code the full documentation is not yet available although major parts have been completed you are reading that part now This manual will be extended during the coming months Check the version you have see the front page for the date it was created In the mean time there are several useful hints and documentation available at the web site of Alex Blustin MSSL who I thank for his help in this That web site can be found at http www mssl ucl ac uk ajb spex spex html The official SPEX website is http www sron nl divisions hea spex index html We apologize for the temporary inconvenience 1 2 Sectors and regions 1 2 1 Introduction In many cases an observer analys
3. A theoretical framework is developed in order to estimate the optimum binning of X ray spectra Ex pressions are derived for the optimum bin size for the model spectra as well as for the observed data using different levels of sophistication It is shown that by not only taking into account the number of photons in a given spectral model bin but also its average energy not necessarily equal to the bin center the number of model energy bins and the size of the response matrix can be reduced by a factor of 10 100 The response matrix should then not only contain the response at the bin center but also its derivative with respect to the incoming photon energy Practical guidelines are given how to construct the optimum energy grids as well as how to structure the response matrix Finally a few examples are given to illustrate the present methods 5 2 Introduction Until recently X ray spectra of cosmic X ray sources were obtained using instruments like proportional counters and GSPC s with moderate spectral resolution typically 5 20 With the introduction of CCD detectors a major leap in resolution has been achieved up to 2 These X ray spectra are usually analysed by a forward folding technique First a spectral model appro priate for the observed source is chosen This model spectrum is then convolved with the instrument response represented usually by a response matrix The convolved spectrum is compared to the ob served spectrum and t
4. E can be approximated by a linear function of energy within a model energy bin j for each data channel i Since we showed already that our binning is also sufficient for a similar linear approximation to A E it follows that also the total response R E can be approximated by a linear function Hence we use within the bin j e e dR i Ea j Ri E P E RE SE Ej Ea j Ej 5 67 Inserting the above in 5 65 and comparing with 5 36 for the classical response matrix we obtain finally 5 6 Determining the grids in practice 105 S 5 RijoF Rija Ea EJE 5 68 j where Rijo is the classical response matrix evaluated for photons at the bin center Note not the average over the bin and R 1 is its derivative with respect to the photon energy Note not to be confused with the data channel evaluated also at the bin center In addition to the classical convolution we thus get a second term containing the relative offset of the photons with respect to the bin center This is exactly what we intended to have when we argued that the number of bins could be reduced considerably by just taking that offset into account It is just at the expense of an additional derivative matrix which means only a factor of two more disk space and computation time But for this extra expenditure we gained much more disk space and computational efficiency because the number of model bins is reduced by a factor between 10 100
5. For example if there is a bright point source superimposed upon the diffuse emission of the cluster we can define two sectors an extended sector for the cluster emission and a point like sector for the point source Both sectors might even overlap as this example shows Another example the two nearby components of the close binary a Cen observed with the XMM instru ments with overlapping psfs of both components In that case we would have two point like sky sectors each sector corresponding to one of the double star s components The model spectrum for each sky sector may and will be different in general For example in the case of an AGN superimposed upon a cluster of galaxies one might model the spectrum of the point like AGN sector using a power law and the spectrum from the surrounding cluster emission using a thermal plasma model 5 5 The proposed response matrix 103 Detector regions The observed count rate spectra are extracted in practice in different regions of the detector It is necessary here to distinguish clearly the sky sectors and detector regions A detector region for the XMM EPIC camera would be for example a rectangular box spanning a certain number of pixels in the x and y directions It may also be a circular or annular extraction region centered around a particular pixel of the detector or whatever spatial filter is desired For the XMM RGS it could be a specific banana part of the detector coordinate CCD
6. If the data set contains multiple regions one must specify the region as well So per instrument region one needs to specify which range to ignore The standard unit chosen for the range of data to ignore is data channels To undo ignore see the use command see section 2 30 The range to be ignored can be specified either as a channel range no units required or in eiter any of the following units keV eV Rydberg Joule Hertz nanometer with the following abbrevations kev ev ryd j hz ang nm Syntax The following syntax rules apply ignore instrument 3411 region i2 r Ignore a certain range r given in data channels of instrument il and region 12 The instrument and region need to be specified if there are more than 1 data sets in one instrument data set or if there are more than 1 data set from different instruments ignore instrument 3411 region 3412 r unit ea Same as the above but now one also specifies the unites a in which the range r of data points to be ignored are given The units can be either A ang or k eV Examples ignore 1000 1500 Ignores data channels 1000 till 1500 ignore region 1 1000 1500 Ignore data channels 1000 till 1500 for region 1 ignore instrument 1 region 1 1000 1500 Ignores the data channels 1000 till 1500 of region 1 from the first instrument ignore instrument 1 region 1 1 8 unit ang Same as the above example but now the range is specified in units of instead
7. Ignore ignoring part of the spectrum 2e Ion select ions for the plasma models lr Log Making and using command files len Menu Men Settings 6 uer us nex nU Um RU eek xor Fuse oso ue RE Model show the current spectral model llle Multiply scaling of the response matrix 2 0 se Obin optimal rebinning of the data ls Par Input and output of model parameters lesen Plot Plotting data and models lee Quit finish the program sais mejo RUE OD Guo E a ne A E S a Sector creating copying and deleting of a sector ll Shiftplot shift the plotted spectrum for display purposes Simulate Simulation of data ees Step Grid search for spectral fits 0 o e Syserr systematic errors 0 O0 OO N NNN CONTENTS Mn oe Mae ag teed aa TT 43 2 30 Use reuse part of the spectrum 4 22 ll ee 43 2 31 Var various settings for the plasma models 200 44 2 b OVERVICW 226 o aa a o Seem a e MENU Bra E E 44 2 31 2 Syntax esa a o Pk La ee ee ee ee pe Ge S03 eas 45 2 31 38 Examples amp ies 2h Ge ee eRe SR OE Re ee ee Raa WW Ee es 45 2 32 Vbin variable rebinning of the data o lens 45 2 99 Watch sus sas set ot ag te ss a AA 46 Spectral Models 49 3 1 Overview of spectral components les 49 3 2 Absm Morrison amp McCammon absorption model
8. Reference element 01 30 Abundances of H to Zn file Filename for the nonthermal electron distribution Chapter 4 More about plotting 4 1 Plot devices The following devices are available may depend somewhat on your local operating system i e the allowed devices in your local pgplot installation null Null device no output xwin Workstations running X Window System xser Persistent window on X Window System ps PostScript printers monochrome landscape 1 2 3 4 5 vps Postscript printers monochrome portrait 6 cps PostScript printers color landscape 7 veps PostScript printers color portrait 8 gif GIF format file landscape 9 vgif GIF format file portrait WARNING Note that when you enter the device name in SPEX you do not need to enter the leading shlash this is only required in other applications using the pgplot library 4 2 Plot types There are several plot types available in SPEX below we list them together with the acronym that should be used when defining this plot type in a plot type command e data a spectrum observed with an instrument plus optionally the folded predicted model spec trum and or the subtracted background spectrum e model the model spectrum not convolved by any instrumental profile e area the effective area of the instrument If the response matrix of the instrument contains more components also the contribution of each comp
9. The highest data channel number as a 4 byte integer for which the response at this model energy bin will be given The response for all data channels above IC2 is zero TTYPE5 NC The total number of non zero response elements for this model energy bin as a 4 byte integer NC is redundant and should equal IC2 IC1 1 but it is convenient to have directly available in order to allocate memory for the re sponse group Any other information that is not needed for the spectral analysis may be put into additional file exten sions but will be ignored by the spectral analysis program Finally I note that the proposed response format is used as the standard format by version 2 0 of the SPEX spectral analysis package 5 7 2 Proposed spectral file format There exists also a standard OGIP FITS type format for spectra As for the OGIP response file format this format has a few redundant parameters and not absolutely necessary options There is some information that is absolutely necessary to have In the first place the net source count rate S counts s and its statistical uncertainty AS counts s are needed These quantities are used e g in a classical x minimization procedure during spectral fitting In some cases the count rate may be rather low for example in a thermal plasma model at high energies the source flux is low resulting in only a few counts per data channel In such cases it is often desirable to use different stat
10. it could be wise to check which parts of the program consume most of the cpu time You might then hope to improve the performance by assuming other parameters or by re structuring a part of the code In this case you set the time flag to true see below and at the end of the program you will see how much time was spent in the most important subroutines Another case occurs in the unlikely case that SPEX crashes In that case it is recommended to re execute the program saving all commands onto a log file and use the sub flag to report the entering and exiting of all major subroutines This makes it more easy to find the source of the error 2 33 Watch A7 Timing is done by the use of the stopwatch package by William F Mitchell of the NIST which is free available at the web If the time flag is set to true on exit SPEX will report for each subroutine the following execution times in s e The user time i e the cpu time spent in this subroutine e The system time i e the overhead system time for this subroutine e The wall time i e the total time spent while executing this subroutine Also the totals for SPEX as a whole are given this may be more then the sum of the subroutine components since not all subroutines are listed separately the wall tiem for SPEX as a whole also includes the time that the program was idle waiting for input from the user Syntax The following syntax rules apply watch time 1 set the time fla
11. photons s for each line contributing to the spectrum for the last plasma layer of the model con list of the ions that contribute to the free free free bound and two photon continuum emission followed by the free free free bound two photon and total continuum spectrum for the last plasma layer of the model 14 Syntax overview tel the continuum line and total spectrum for each energy bin added for all plasma layers of the model tlin the line energy and wavelength as well as the total line emission photons s for each line contributing to the spectrum added for all plasma layers of the model tcon list of the ions that contribute to the free free free bound and two photon continuum emission followed by the free free free bound two photon and total continuum spectrum added for all plasma layers of the model cnts the number of counts produced by each line Needs an instrument to be defined before snr hydrodynamical and other properties of the supernova remnant only for supernova rem nant models such as Sedov Chevalier etc heat plasma heating rates only for photoionized plasmas ebal the energy balance contributions of each layer only for photoionized plasmas dem the emission measure distribution for the pdem model col the ionic column densities for the hot pion slab xabs and warm models tran the transmission and equivalent width of absorption lines and absorption edges for the hot pion slab
12. shows some examples of the use of pgplot escape sequences in character strings 4 5 Plot text 75 Table 4 4 Some useful non ASCII character sequences 2248 V 0583 0248 v 2267 0250 2268 x 2245 2269 2239 oo 2270 2243 O 2286 2244 2281 Displayed pgplot escape sequence f x z cos 2nz fif x x u2 d frcos fi fr2 fi gpx Ho 75 25 kms Mpc fiH dO u fr 75 2233 25 km s u 1 d Mpc u 1 d Lo 5 6 41216 fsL L fr d 2281 Nu 5 6 gl1216 A Figure 4 4 Some examples of the use of pgplot escape sequences 76 More about plotting 4 6 Plot captions Spex has a set of captions defined for each plot The properties of these captions as well as the text can be modified by the user For the properties font types etc see Sect 4 5 The following captions exist e x the x axis plotted below the frame e y the y axis plotted left from the frame e z the z axis for contour plots and images plotted at the upper left edge of the frame e ut the upper title text plotted in the middle above the frame e lt the lower title text plotted between the upper title text and the frame id the plot identification plotted to the upper right corner of the frame usually contains the SPEX version and time and date With the plot cap series of commands the text appearance and position of all these captions can be modified 4 7 Plot symbols 4 7 Plot symbols When plot
13. signal to noise ratio B AB has a Poissonian distribution Furthermore there may be systematic calibration uncertainties for example in the instrumental effective area or in the background subtraction These systematic errors may be expressed as a fraction of the source count rate such that the total systematic source uncertainty is 5 and or as a fraction of the subtracted background such that the total systematic background uncertainty is ey B Again these systematic errors may vary from data channel to data channel They should also be treated different than the statistical errors in spectral simulations they must be applied to the simulated spectra after that the statistical errors have been taken into account by drawing random realisations Also whenever spectral rebinning is done the systematic errors should be averaged and applied to the rebinned spectrum a 10 systematic uncertainty over a given spectral range may not become 1 by just rebinning by a factor of 100 but remains 10 while a statistical error of 10 becomes 1 after rebinning by a factor of 100 5 8 examples 111 In the previous sections we have shown how to choose the optimal data binning The observer may want to rebin further in order to increase the significance of some low statistics regions in the spectrum or may want to inspect the unbinned spectrum Also during spectral analysis or beforehand the observer may wish to discard certain parts of the spectr
14. using 5 28 Determine for each bin the effective number of events N from the following expressions 124 1 G Y Or 5 71 k i1 1 Ne 124 1 he Y Rrjo XO Big 5 72 k 1 k i1 1 N CH 5 73 In the above Ck is the number of observed counts in channel k and Ne is the total number of channels Take care that in the summations 41 1 and i2 1 are not out of their valid range 1 Ne If for some reason there is not a first order approximation available for the response matrix Ry then one might simply approximate h from e g the Gaussian approximation namely h 1 314 cf section 2 This is justified since the optimum bin size is not a strong function of N cf fig 5 4 Even a factor of two error in N in most cases does not affect the optimal binning too much Calculate 6 AL R A N for each data channel 10 Using 5 33 determine for each data channel the optimum data bin size in terms of the FWHM The true bin size b in terms of number of data channels is obtained by multiplying this by c calculated above during step 4 Make b an integer number by ignoring all decimals rounding it to below but take care that b is at least 1 It is now time to merge the data channels into bins In a loop over all data channels start with the first data channel Name the current channel i Take in principle all channels k from channel i to i b 1 together However check that the bin size does not decrease significant
15. which also leads to additional computing time And finally the response matrices of the RGS become extremely large The RGS spectral response is approximately Gaussian in its core but contains extended scattering wings due to the gratings up to a distance of 0 5 from the line center Therefore for each energy the response matrix is significantly non zero for at least some 100 data channels giving rise to a response matrix of 20 million non zero elements In this way the convolution of the model spectrum with the instrument response becomes also a heavy burden For the AXAF LETG grating the situation is even worse given the wider energy range of that instrument as compared to the XMM RGS Fortunately there are more sophisticated ways to evaluate the spectrum and convolve it with the instru ment response as is shown in the next subsection 5 4 3 Binning the model spectrum We have seen in the previous subsection that the classical way to evaluate model spectra is to calculate the total number of photons in each model energy bin and to act as if all flux is at the center of the bin In practice this implies that the true spectrum f E within the bin is replaced by its zeroth order approximation fo E given by fo E N E Ej 5 39 where N is the total number of photons in the bin E the bin centroid as defined in the previous section and 6 is the delta function In this section we assume for simplicity that the instrume
16. xabs and warm models warm the column densities effective ionization parameters and temperatures of the warm model Syntax The following syntax rules apply for ascii output ascdump terminal 411 2 a Dump the output for sky sector il and component i2 to the terminal screen the type of output is described by the parameter a which is listed in the table above ascdump file al 11 i2 a2 As above but output written to a file with its name given by the parameter al The suffix asc will be appended automatically to this filename WARNING Any existing files with the same name will be overwritten Examples ascdump terminal 3 2 icon dumps the ion concentrations of component 2 of sky sector 3 to the terminal screen ascdump file mydump 3 2 icon dumps the ion concentrations of component 2 of sky sector 3 to a file named mydump asc 2 3 Bin rebin the spectrum 15 2 3 Bin rebin the spectrum Overview This command rebins the data thus both the spectrum file and the response file in a manner as described in Sect 2 6 The range to be rebinned can be specified either as a channel range no units required or in eiter any of the following units keV eV Rydberg Joule Hertz nanometer with the following abbrevations kev ev ryd j hz ang nm Syntax The following syntax rules apply bin r i This is the simplest syntax allowed One needs to give the range r over at least the input data chann
17. 627 1066 Juett A M Schulz N amp Chakrabarty D 2004 ApJ 612 308 Kaastra J S amp Barr P 1989 A amp A 226 59 Kaastra J S amp Jansen F A 1993 A amp A Supp 97 873 Kaastra J S Tamura T Peterson J R et al 2004 A amp A 413 415 Krause M O 1994 Nucl Instrum Methods Phys Res 87 178 Laor A 1991 ApJ 376 90 Lodders K 2003 ApJ 591 1220 Magdziarz P Zdziarski A A 1995 MNRAS 273 837 Mendoza C Kallman T R Bautista M A amp Palmeri P 2004 A amp A 414 377 Morrison R McCammon D 1983 ApJ 270 119 Nahar S N Pradhan A K amp Zhang H L 2001 Phys Rev A 63 060701 Olalla E Wlison N J bell K L Martin L amp Hibbert A 2002 MNRAS 332 1005 Palmeri P Mendoza C Kallman T R Bautista M A amp M lendez M 2003 A amp A 410 359 124 2003 1999 2004 2003 1976 1994 1979 1995 1996 1995 1994 1999 BIBLIOGRAPHY Peterson J R Kahn S M Paerels F B S et al 2003 ApJ 590 207 Phillips K J H Mewe R Harra Murnion L K et al 1999 A amp A Supp 138 381 Porquet D Kaastra J S Page K L et al 2004 A amp A 413 913 Pradhan A K Chen G X Delahaye F Nahar S N amp Oelgoetz J 2003 MNRAS 341 1268 Ross J E amp Aller L H 1976 Science 191 1223 Rumph T Bowyer S amp Vennes S 1994 AJ 107 2108 Rybicki G B amp Lightman A P 1979 Radiative processes in astr
18. Figure 5 4 Required bin width A relative to the FWHM for a Gaussian distribution as a function of N for R 1 10 100 1000 and 10000 from top to bottom respectively In fig 5 4 we show the required binning expressed in FWHM units for a Gaussian Isf as a function of R and N and in fig 5 5 for a Lorentzian For the Gaussian the resolution depends only weakly upon the number of counts N However in the case of a pure Lorentzian profile the required bin width is somewhat smaller than for a Gaussian This is due to the fact that the Fourier transform of the Lorentzian has relatively more power at high frequencies than a Gaussian exp wo versus exp wo 2 respectively For low count rate parts of the spectrum the binning rule 1 3 FWHM usually is too conservative 5 3 9 Final remarks We have estimated conservative upper bounds for the required data bin size In the case of multiple resolution elements we have determined the bounds for the worst case phase of the grid with respect to the data In practice it is not likely that all resolution elements would have the worst possible alignment In fact for the Gaussian Isf the phase averaged value for 6 at a given bin size A is always smaller than 5 4 Model binning 95 Figure 5 5 Required bin width A relative to the FWHM for a Lorentz distribution as a function of N for R 1 10 100 1000 and 10000 from top to bottom respectively 0 83 and is between 0 82 0 83 fo
19. Finally a practical note The derivative R j can be calculated in practice either analytically or by numerical differentiation In the last case it is more accurate to evaluate the derivative by taking the difference at E AE 2 and E AE 2 and wherever possible not to evaluate it at one of these boundaries and the bin center This last situation is perhaps only un avoidable at the first and last energy value Also negative response values should be avoided Thus it should be ensured that Rijo Rij 1h is everywhere non negative for AE 2 lt h AE 2 This can be translated into the constraint that R 1 should be limited always to the following interval 2Rijo AE ud Rija lt 2Rijo AE 5 69 Whenever the calculated value of jj should exceed the above limits the limiting value should be inserted instead This situation may happen for example for a Gaussian redistribution for responses a few o away from the center where the response falls of exponentially However the response Rijo is small anyway for those energies so this limitation is not serious The only reason is that we want to avoid negative predicted count rates whatever small they may be 5 6 Determining the grids in practice Based upon the theory developed in the previous sections I present here a practical set of algorithms for the determination of both the optimal data binning and the model energy grid determination This may be helpful for the practical purpose of de
20. Multiple graphics devices can be defined in one SPEX session For example a plot can be sent to both a postscript and a xs device A user can also set the number of plot frames in the currently active device s e g the data and model can be displayed in one frame while the residuals can be displayed in a frame below The user has to specify what is to be plotted in in each frame In each plot frame there can be different sets that can be specified by the set keyword in the plot command For example for the plot type data each set corresponds to the spectrum of an instrument or region with this option it is therefore possible to give different instruments different colours or plot symbols etc or just to omit one of the instruments from the plot The plot command is also used to select the axis plot units and scales as well as character commands like font style line weights plot colours etc Finally the plot command can also be used to dump the data to an ascii file WARNING To make a plot always start with a plot device command to open any plot device you wish Next select a plot type using plot type After this you can give any plot commands to modify or display the plot Syntax The following syntax rules apply for plot plot Re draws the plot on the graphics device Take care to open at least one device first with a plot dev command plot frame new Creates a new additional plot frame where an other plot t
21. The function f x must correspond to a probability function i e for all values of z we have f z 20 3 29 J f z dz 1 3 30 In our implementation we do not use f a but instead the cumulative probability density function F x which is related to f x by and furthermore y f y dy 3 31 where obviously F oo 0 and F oo 1 The reason for using the cumulative distribution is that this allows easier interpolation and conservation of photons in the numerical integrations If this component is used you must have a file available which we call here vprof dat but any name is allowed This is a simple ascii file with n lines and at each line two numbers a value for x and the corresponding F x The lines must be sorted in ascending order in x and for F x to be a proper probability distribution it must be a non decreasing function i e if F x F ai 1 for all values of i between 1 and n 1 Furthermore we demand that F x1 0 and F x 1 Note that both x and F x are dimensionless The parameter v serves as a scaling parameter for the total amount of broadening Of course for a given profile there is freedom for the choice of both the x scale as well as the value of v as long as e g z v remains constant In practice it is better to make a logical choice For example for a rectangular velocity broadening equivalent to the vblo broadening model one would choose n 2 with z 1 z2 1 F 1 0 and F x
22. The parameters of the model are norm Normalisation A of the power law gamm The photon index I of the ionising spectrum ecut The cut off energy keV of the ionising spectrum If no cut off is desired take this parameter zero and keep it frozen pow If pow 1 the incoming power law is added to the spectrum default if pow 0 only the reflected spectrum is given disk If disk 1 the spectrum will be convolved with an accretion disk profile default if disk 0 this is not done fer Full general relativity used default for fgr 1 t Temperature of the reflector disk in keV xi Ionisation parameter L nr in the usual c g s based units of 107 Wm abun The abundance of all metals excluding H and He in solar units feab The iron abundance with respect to the other metals cosi The cosine of the inclination angle of the disk cosi 0 i 1 2 corresponds to edge on scal Scale s for reflection For an isotropic source above the disk s 1 This value corresponds to seeing equal contributions from the reflected and direct spectra q Emissivity index for the accretion disk default value 3 rl Inner radius of the disk in units of GM c Default 10 12 Outer radius of the disk in units of GM c Default 104 3 24 Rrc Radiative Recombination Continuum model This is a simplified model aimed to calculate radiative recombination continua for photoionized plasmas It is a simple limited shortcut
23. Zn file Filename for the nonthermal electron distribution 3 5 Cie collisional ionisation equilibrium model This model calculates the spectrum of a plasma in collisional ionisation equilibrium CIE It consists essentially of two steps first a calculation of the ionisation balance and then the calculation of the X ray spectrum The basis for this model is formed by the mekal model but several updates have been included 3 5 1 Temperatures Some remarks should be made about the temperatures SPEX knows three temperatures that are used for this model First there is the electron temperature Te This is usually referrred to as the temperature of the plasma It determines the continuum shape and line emissivities and the resulting spectrum is most sensitive to this Secondly there is the ion temperature 7i This is only important for determining the line broadening since this depends upon the thermal velocity of the ions which is determined both by T and the atomic mass of the ion Only in high resolution spectra the effects of the ion temperature can be seen 52 Spectral Models Finally we have introduced here the ionization balance temperature Tp that is used in the determination of the ionization equilibrium It is the temperature that goes into the calculation of ionization and re combination coefficients In equilibrium plasmas the ratio Rp T T is 1 by definition It is unphysical to have Ry not equal to 1 Nevertheless we a
24. a given filename if the file exists SPEX stops immediately execution and terminates if the file does not exist SPEX continues normally Syntax The following syntax rules apply system exe a execute the command a on your UNIX linux shell system stop fa stop SPEX if the file a exists Examples system exe ls 1 give a listing of all file names with length in the current directory system exe myfortranprogram execute the fortran program with name myfortranprogram system stop testfile stop SPEX if the file with name testfile exists if this file does not exist con tinue with SPEX 2 30 Use reuse part of the spectrum Overview This command can only be used after the ignore command was used to block out part of the data set in the fitting The command re includes thus part of the data set for fitting As it undoes what the ignore command did see section 2 14 the syntax and use of both are very similar Again one can must specify the instrument and region for one wants the data to be re included Further can one specify the units chosen to give the range of data points to be included The standard unit is that of data channels and does not need to be specified The data points re included with use will automatically also be plotted again The range to be reused can be specified either as a channel range no units required or in eiter any of the following units keV eV Rydberg Joule Hertz nanometer with the f
25. addition plotshift 1 the addition constant is given in counts s This thus leads to a different energy dependent constant being added to the plotted spectrum if the units are not in counts s For the multiplicative case this is of course not the case Syntax The following syntax rules apply shiftplot 4i r i indicates whether a constant should be added i 1 or multiplied 4i 2 to the spectrum and model r is then the constant to be added or multiplied by shiftplot instrument il region i2 i3 r Shift the plot using a factor r Here i3 plot shift determines whether the constant is added plotshift 1 or multiplied plotshift 2 The optional instrument range il can be used to select a single instrument or range of instruments for which the shift needs to be applied and the optional region range i2 the region for these instruments Examples shiftplot 1 2 0 Adds 2 counts s to the plotted spectrum Since no instrument or region is specified this applies for all spectra shiftplot 2 10 0 Multiplies the plotted spectrum by a factor of 10 0 shiftplot instrument 1 region 2 1 2 Adds 2 counts s to the plotted spectrum for the data from instrument 1 and region 2 shiftplot region 2 3 1 2 Adds 2 counts s to the plotted spectrum for the data for all instruments and regions 2 3 40 Syntax overview 2 26 Simulate Simulation of data Overview This command is used for spectral simulations The user should
26. be displayed by using the ascdump term dem command you will get a list of temperature keV versus emission measure 3 21 Pow Power law model The power law spectrum as given here is a generalization of a simple power law with the possibility of a break such that the resultant spectrum in the log F log E plane is a hyperbola The spectrum is given by F E AE T e 3 23 where E is the photon energy in keV F the photon flux in units of 10 ph s keV and the function n E is given by r 4 r2 amp b2 1 r ME gt 3 24 with In E Eo and Eo r and b adjustable parameters For high energies becomes large and then y approaches 2r 1 r while for low energies approaches oo and as a consequence 1 goes to zero Therefore the break AT in the spectrum is AT 2r 1 r Inverting this we have pa Ed aed 3 25 AT The parameter b gives the distance in logarithmic units from the interception point of the asymptotes of the hyperbola to the hyperbola A value of b 0 therefore means a sharp break while for larger values of b the break gets smoother The simple power law model is obtained by having AT 0 or the break energy Eo put to a very large value WARNING By default the allowed range for the photon index T is 10 10 If you manually increase the limits you may run the risk that SPEX crashes due to overflow for very large photon indices WARNING Note the sign o
27. by the requirements for the model binning not the effective area curvature upper right panel of fig 5 8 This is due to the higher spectral resolution as compared to the PSPC Only near the instrumental edges below 1 keV a small contribution from the effective area exists The original OGIP matrix uses a constant model energy grid bin size of 10 eV as can be seen from the middle right panel of fig 5 8 It can be seen from that panel that below 3 keV that binning is much too coarse one should take into account that the OGIP matrices are used in the approximation of all flux 5 8 examples 113 Table 5 12 Second extension to the spectrum file EXTNAME Contains the basic spectral data in the form of a binary table SPEC_SPECTRUM NAXIS1 28 There are 28 bytes in one row NAXIS2 This number corresponds to the total number of data chan nels as added over all regions the number of rows in the table TFIELDS 12 The table has 12 columns TTYPE1 Lower Energy Nominal lower energy of the data channel c in keV 4 byte real TTYPE2 Upper Energy Nominal upper energy of the data channel cj in keV 4 byte real TTYPE3 Exposure Time Net exposure time t in s 4 byte real TTYPE4 Source Rate Background subtracted source count rate S of the data channel in counts s 4 byte real TTYPE5 Err Source Rate Background subtracted source count rate error AS of the data channel in counts s ie the statistical error on Sourc
28. command file is resumed or if the command file was opened from the terminal control is passed over to the terminal again Finally 1t is also possible to store all the output that is printed on the screen to a file This is usefull for long sessions or for computer systems with a limited screen buffer The output saved this way could be inspected later by other programs of the user It is also usefull if SPEX is run in a kind of batch mode Syntax The following syntax rules apply for command files log exe a Execute the commands from the file a The suffix com will be automatically appended to this filename log save a overwrite append Store all subsequent commands on the file a The suffix com will be automatically appended to this filename The optional argument overwrite will allow to overwrite an already existing file with the same name The argument append indicates that if the file already exists the new commands will be appended at the end of this file log close save Close the current command file where commands are stored No further commands will be written to this file log out fa overwrite append Store all subsequent screen output on the file a The suffix out will be automatically appended to this filename The optional argument overwrite will allow to overwrite an already existing file with the same name The argument append indicates that if the file already exists the new
29. component of sector 2 will automatically be updated to a value of 3 x 40 120 par 3 5 02 30 couple 1 02 30 Couples the abundances of He Zn of components 3 4 and 5 to the He Zn abundances of component 1 par norm decouple Decouples the norm of the current component from whatever it was coupled to par show Shows all the parameters of the current model for all sectors and how they are coupled if applicable For each parameter it shows the value status range and coupling information as well as info on its units etc It also shows the fluxes and restframe luminosities of the additive components photon flux phot m 2 s and energy flux W m 2 are the values observed at Earth including any transmission effects like Galactic absorption or intrinsic absoprtion that have been taken into account and the nr of photons photons s and luminosity W are all as emitted by the source without any attenuation par show free As above but only displays the parameters that have the status thawn 34 Syntax overview par write mypar overwrite SPEX writes all parameters for the model to a file named mypar com Any previously existing file mypar com is overwritten par write mypar Same command as above but now a new file is created If there already exists a file with the same filename SPEX will give an error message 2 22 Plot Plotting data and models Overview The plot command cause the plot to be re drawn on the graphics device
30. distributions We have taken into account also the effect of possible phase shifts i e that the center of the distribution does not coincide with a grid point but with a certain phase of the grid The maximum bin width A FWHM as a function of the maximum absolute difference 6 between the true and approximated cumulative density distribution is plotted for both distributions in fig 5 3 A FWHM Figure 5 3 Required bin width A as a function of the accuracy parameter 6 for a Gaussian distribution solid line and a Cauchy distribution dashed line We can approximate both curves with sufficient accuracy by a polynomial in x log as 4 10 5 1 log A FWHM Y ci ol o 5 32 1 0 10 E 80 log A FWHM Ya 5 33 94 Response matrices for the Cauchy distribution 5 32 and Gaussian distribution 5 33 respectively with the coefficents given in table 5 7 Table 5 7 Coefficients for the approximations for the Cauchy and Gauss distribution The rms deviation of these fits over the range 107 lt 6 lt 1 is 0 0086 for the Cauchy distribution and 0 0070 for the Gauss distribution Outside of this range the approximation gets worse however those values for 6 are of no practical use The bin size as a function of the number of resolution elements R and number of photons per resolution element N is now obtained by combining 5 32 or 5 33 with 5 28 and using Ar VN 5 34 A FWHM
31. function R c E has therefore been replaced by a response matrix Rij where the first index i denotes the data channel and the second index j the model energy bin number We have explicitly S X RE 5 36 J where now S is the observed count rate in counts s for data channel i and F is the model spectrum photons m s for model energy bin j This basic scheme is widely used and has been implemented e g in the XSPEC and SPEX version 1 10 and below packages 5 4 2 Evaluation of the model spectrum The model spectrum Pj can be evaluated in two ways First the model can be evaluated at the bin centroid Ej taking essentially F f Ej AE 5 37 This is appropriate for smooth continuum models like blackbody radiation power laws etc For line like emission it is more appropriate to integrate the line flux within the bin analytically and taking Fy f E dE 5 38 Now a sometimes serious flaw occurs in most spectral analysis codes The observed count spectrum S is evaluated straightforward using eqn 5 36 Hereby it is assumed that all photons in the model bin 7 have exactly the energy Ej This has to be done since all information on the energy distribution within the bin is lost and F is essentially only the total number of photons in the bin Why is this a problem It should not be a problem if the model bin width AE is sufficiently small However this is most often not the case Let us take an example The st
32. is because it needs to be evaluated for all energies ions and atomic sublevels that are relevant In rder to reduce the computational burden there is a parameter gfbacc in SPEX that is approximately the accuracy level for the free bound calculation The default value is 1079 If this quantity is higher less shells are taken into account and the computation proceeds faster but less accurate The users are advised not to change this parameter unless they are knowing what they do Line emission contributions By default all possible line emission processes are taken into account in the plasma models For testing purposes it is possible to include or exclude specific contributions These are listed below in Table 2 6 Table 2 6 Possible line emission processes Abbrevation Process electron excitation radiative recombination dielectronic recombination dielectronic recombination satellites inner shell ionisation Doppler broadening By default thermal Doppler broadening is taken into account However the user can put this off for testing purposes Atomic data The user can choose between the old Mekal code the current default and updated calculations for the ions for which this is possible 2 32 Vbin variable rebinning of the data 45 Mekal code We have made several minor improvements to the original Mekal plasma model These improvements are included by default However it is possible to discard some of these improveme
33. is to be binned r1 are specified in units a different from data channels These units can be eV keV as well as in units of Rydberg ryd Joules j Hertz hz and nanometers nm vbin instrument il region i2 413 i4 r Here i3 and i4 are the same as il and i2 in the first command also r is the minimal S N ratio required However here one can specify the instrument range il and the region range i2 as well so that the binning only is performed for a certain data set vbin instrument il region i2 r1 i2 12 unit a This command is the same as the above except that here one can specify the range over which the binning should occur in the units specified by a These units can be eV A keV as well as in units of Rydberg ryd Joules j Hertz hz and nanometers nm Examples vbin 1 10000 3 10 Bins the data channels 1 10000 with a minimal bin width of 3 data channels and a minimum S N ratio of 10 vbin 1 4000 3 10 unit ev Does the same as the above but now the data range to be binned is given in eV from 1 4000 eV instead of in data channels vbin instrument 1 region i 1 19 3 10 unit a Bins the data from instrument 1 and region 1 be tween 1 and 19 with the same minimum bin width and S N as above 2 33 Watch Overview If you have any problems with the execution of SPEX you may set the watch options For example if the computation time needed for your model is very large
34. may also be a circular or annular extraction region centered around a particular pixel of the detector or whatever spatial filter is desired For the XMM RGS it could be a specific banana part of the detector coordinate CCD pulse height plane z E Note that the detector regions need not to coincide with the sky sectors neither should their number to be equal A good example of this is again the example of an AGN superimposed upon a cluster of galaxies The sky sector corresponding to the AGN is simply a point while for a finite instrumental psf its extraction region at the detector is for example a circular region centered around the pixel corresponding to the sky position of the source Also one could observe the same source with a number of different instruments and analyse the data simultaneously In this case one would have only one sky sector but more detector regions namely one for each participating instrument 1 3 Different types of spectral components In a spectral model SPEX uses two different types of components called additive and multiplica tive components respectively Additive components have a normalisation that determines the flux level Multiplicative components operate on additive components A delta line or a power law are typical examples of additive components Interstellar absorption is a typical example of multiplicative components The redshift component is treated as a multiplicative component since it operate
35. now Pon and are related to the lsf not to the observed spectrum Further k is the number of bins within the resolution element The value of A in 5 17 is given again by 5 14 where now k represents the total number of bins in the spectrum i e R k kr 5 19 Combining everything we have for each resolution element r er 2k p a f Rr 5 20 5 3 6 Difficulties with the X test The first step in applying the theory derived above is evaluating 5 18 for a given Isf Let us take a Gaussian lsf sampled with a step size of lo as an example Table 5 3 summarizes the intermediate steps Table 5 3 Contribution to Ac for a gaussian lsf EAN A A E 6 11 10 19 3 04 107 1 28 1071 3 33 10 4 9 85 10 79 3 65 10 4 2 86 1077 3 99 10 4 3 14 107 4 60 1074 1 32 1078 87710 2 14 107 2 18 107 1 36 10 1 36 1071 3 41 107 3 42 107 3 41 107 3 42 1071 1 36 107 1 36 10 2 14 107 2 18 107 1 32 1078 8 77 1074 3 14 10 4 60 1074 2 86 1077 3 99 1074 9 85 10 1 3 65 1074 1 28 107 3 33 1074 0 1 2 3 4 5 6 7 8 It is seen immediately that for large values of n the probability pon of a photon falling in bin n decreases rapidly Also the approximation is always better than 0 0005 However the relative error of the approximation increases as n increases Therefore the largest contribution to x comes from the tails of the Gaussian distribution In practice one could cir
36. observed data set The statistic D VND for large N typically 10 or larger has the limiting Kolmogorov Smirnov distribution The hypothesis that the true cumulative distribution is F will be rejected if D gt Ca where the critical value cq corresponds to a certain size a of the test A few values for the confidence level are given in table 5 5 The expected value of the statistic D is y7 21n2 0 86873 and the standard deviation is 74 1 12 In 2 7 0 26033 Similar to the case of the x test we can argue that a good criterion for determining the optimum bin size A is that the maximum difference VN max F mA F mA 5 22 should be sufficiently small as compared to the statistical fluctuations described by D Similar to 5 11 we can derive equations determining Az for a given size of the test a and f Fxs ca 1 0 5 23 Fxs Ca Ax 1 fa 5 24 II 5 3 Data binning 91 Table 5 5 Critical valuse c for the Kolmogorov Smirnov test as a function of the size of the test o Equation 5 23 gives the critical value for the Kolmogorov statistic as a function of the size a under the assumption Ho Equation 5 24 gives the critical value for the Kolmogorov statistic as a function of the size a under the assumption H Taking a 0 05 and f 2 we find Az 0 134 Again as in the case of the x test this quantity depends only weakly upon a for a 0 01 f 2 we would have 0 110 Similar for the case
37. of in data channels ignore 1 8 unit ang Ignores the data from 1 to 8 A only works if there is only one instrument and one region included in the data sets 2 15 Ion select ions for the plasma models Overview For the plasma models it is possible to include or exclude specific groups of ions from the line calulations This is helpful if a better physical understanding of the atomic physics behind the spectrum is requested 28 Syntax overview Currently these settings only affect the line emission in the calculation of the ionisation balance as well as the continuum always all ions are taken into account unless of course the abundance is put to zero Syntax The following syntax rules apply ions show Display the list of ions currently taken into account ions use all Use all possible ions in the line spectrum ions use iso i Use ions of the isoelectronic sequences indicated by 1 in the line spectrum ions use z i Use ions with the atomic numbers indicated by i in the line spectrum ions use ion il 7112 Use ions with the atomic number indicated by il and ionisation stage indicated by i2 in the line spectrum ions ignore all Ignore all possible ions in the line spectrum ions ignore iso i Ignore ions of the isoelectronic sequences indicated by i in the line spectrum ions ignore z i Ignore ions with the atomic numbers indicated by Zi in the line spectrum ions ignore ion il 12 Ignore ions with
38. pulse height plane z c Note that the detector regions need not to coincide with the sky sectors neither should their number to be equal A good example of this is again the example of an AGN superimposed upon a cluster of galaxies The sky sector corresponding to the AGN is simply a point while for a finite instrumental psf its extraction region at the detector is for example a circular region centered around the pixel corresponding to the sky position of the source Also one could observe the same source with a number of different instruments and analyse the data simultaneously In this case one would have only one sky sector but more detector regions namely one for each participating instrument Consequences for the response In all the cases mentioned above where there is either more than one sky sector or more than one detector region involved it is necessary to generate the response contribution for each combination of sky sector detector region In the spectral analysis for each sky sector the model photon spectrum is calculated and all these model spectra are convolved with the relevant response contributions in order to predict the count spectra for all detector regions Each response contribution for a sky sector detector region combination itself may consist again of different response components as outlined in the previous subsection Combining all this the total response matrix then will consist of a list of components
39. recovered while for a 0 the emission measure distribution is flat Note that Peterson et al 2003 use a similar parameterisation but then for the differential luminosity distribution In practice we have implemented the model 3 32 by using the integrated emission measure Yo instead of c for the normalisation and instead of a its inverse p 1 a so that we can test isothermality by taking p 0 The emission measure distribution for the model is binned to bins with logarithmic steps of 0 10 in log T and for each bin the spectrum is evaluated at the emission measure averaged temperature and with the integrated emission measure for the relevant bin this is needed since for large a the emission measure weighted temperature is very close to the upper temperature limit of the bin and not to the bin centroid Instead of using Tmin directly as the lower temperature cut off we use a scaled cut off c such that Tmin CTmax WARNING Take care thatc lt 1 Forc 1 the model becomes isothermal regardless tha value of a The parameters of the model are norm Integrated emission measure between Tmin and Tmax t0 Maximum temperature Tmax in keV Default 1 keV p Slope p 1 a Default 0 25 a 4 cut Lower temperature cut off c in units of Tmax Default value 0 1 The following parameters are the same as for the cie model ed Electron density in 10 m it Ion temperature in keV vmic Micro turbulent velocity in km s ref
40. temperature T in keV Default value 1 keV h2 The H 11 emission measure nen iV in units of 10 m Default value 0 he2 The Heit emission measure nenye nV in units of 109 m Default value 0 he3 The He 111 emission measure nengerV in units of 10 m Default value 0 ni29 The Ni XXIX emission measure nenw xxix V in units of 109 m Default value 0 3 25 Spln spline continuum model Sometimes the continuum of an X ray source may be too complex to model with known physical com ponents A situation like that may be found in AGN continua which are a complex superposition of hard power law soft continuum excess relativistically broadened and normal broad lines with a priori unknown line shape etc while in addition a superimposed warm absorber may have well defined narrow absorption lines In that case it might be useful to fit the continuum with an arbitrary profile in order to get first an accurate description of the absorber and then after having removed the absorber try to understand the underlying continuum spectrum For these situations the spln model introduced here is useful It allows the user to model the continuum within two boundaries b and bz with a cubic spline The algorithm works as follows The user selects the limits bi and bz as well as the number of grid points n SPEX then creates a grid 21 2 n with uniform spacing in b see below for details The spectrum at these grid points is conta
41. the number of data channels as present in the corresponding spectrum file Second column contains the number of model energy grid bins for each component Not necessarily the same for all components Third column contains the sky sector number as defined by the user for this component In case of simple spectra this number should be 1 Fourth column contains the detector region number as de fined by the user for this component In case of simple spec tra this number should be 1 5 7 Proposed file formats 109 Table 5 9 Second extension to the response file EXTNAME RESP_COMP Binary table with for each row relevant index information for a single energy of a component stored sequentially starting at the lowest component and within each component at the lowest energy NAXIS1 20 There are 20 bytes in one row NAXIS2 This number must be the sum of the number of model energy bins added for all components the number of rows in the table TFIELDS 5 The table has 5 columns TTYPE1 EGI The lower energy keV as a 4 byte real of the relevant model energy bin TTYPE2 EG2 The upper energy keV as a 4 byte real of the relevant model energy bin TTYPES3 IC1 The lowest data channel number as a 4 byte integer for which the response at this model energy bin will be given The response for all data channels below IC1 is zero Note that IC1 should be at least 1 i e start counting at channel 1 TTYPE4 1C2
42. the parameters specified by the sector range il optional component range i2 optional and parameter range a optional If not specified the range for the last call will be used On startup this is the first parameter of the first component of the first sector error dchi r This command changes the Ax to the value r Default at startup and recommende value to use is 2 for other confidence levels see Table 2 4 error start r This command gives an initial guess of the error bar from where to start searching the relevant error This can be helpful for determining the errors on normalization parameters as otherwise SPEX may from a rather small value To return to the initial situation put r 0 automatic error search Examples error norm Find the error for the normalization of the current component error 2 3 norm gamm determines the error on all free parameters between norm and gamm for components 2 3 error start 0 01 Start calculating the error beginning with an initial guess of 0 01 error dchi 2 71 Calculate from now onwards the 90 error for 1 degree of freedom Not recom mended use r m s errors instead 2 12 Fit spectral fitting 25 Table 2 4 Ax as a function of confidence level P and degrees of freedom v 2 12 Fit spectral fitting Overview With this command one fits the spectral model to the data Only parameters that are thawn are changed during the fitting process Options allow y
43. the temperature much lower than 0 0005 keV because if the plasma is completely neutral the code will crash a tiny fraction of ions such as Feu or Natt will help to keep a few free electrons in the gas without affecting the transmission too much You can check the ion concentrations by giving an asc ter icon command The parameters of the model are nh Hydrogen column density in 1075 m Default value 1074 corresponding to 10 m a typical value at low Galactic latitudes t the electron temperature Te in keV Default value 1 rt the ratio of ionization balance to electron temperature Rp Th Te in keV Default value 1 The following parameters are common to all our absorption models f The covering factor of the absorber Default value 1 full covering v Root mean square velocity o rms Rms velocity oj of line blend components dv Velocity distance Av between different blend components zv Average systematic velocity v of the absorber The following parameters are the same as for the cie model seer there for a description ref Reference element 01 30 Abundances of H to Zn file Filename for the nonthermal electron distribution 3 15 Knak segmented power law transmission model The knak model is used to model the transmission of any spectrum using a set of contiguous segments with a power law transmission at each segment This component can be useful for new instruments in order to test large s
44. to a more fully complete model for the emission from a recombining plasma The user essentially prescribes the emission measure for each ion as well as the radiation temperature and then this model calculates the continuum emission corresponding to this temperature and set of 3 25 Spln spline continuum model 65 ionic emission measures Line radiation is not taken into account However for physical self consistency we take account of all three continuum emission components Bremsstrahlung two photon emission and free bound radiation the RRC The reason for having no physical model to couple the ionic emission measures contrary to for example the CIE model is that this allows the user to fit these emission measures without making a priori assumptions about the ionization equilibrium The user might then combine later the set of derived emission measures with any of his relevant models WARNING Take care that for too high temperatures two photon emission might be stronger than the free bound RRC emission WARNING Take care that the fit parameters are emission measures of a given ion while the radiation occurs in the next ion For example radiative recombination of OIX to OVIII is proportional to the emission measure of OIX nenorxV but produces an emission edge in O vin at 14 22 A WARNING No recombination is possible to neutrals so therefore there is no H1 O1 or Fel in this model The parameters of the model are t The
45. 1075 m Default value 1074 corresponding to 10 m a typical value at low Galactic latitudes f The covering factor of the absorber Default value 1 full covering 3 3 Bb Blackbody model The surface energy flux of a blackbody emitter is given by 2nhv3 c Fy 1B e 3 1 cf Rybicky amp Lightman 1979 chapter 1 We transform this into a spectrum with energy units conversion from Hz to keV and obtain for the total photon flux E 50 acronym pow delt gaus bb mbb dbb cie nelj sed chev soli band pdem cf wdem dem refl file reds vgau vblo vpro Ipro laor absm euve hot slab xabs warm knak Spectral Models Table 3 1 Available spectral components description additive components Power law Delta line Gaussian line Blackbody Modified blackbody Accretion disk blackbody Collisional ionisation equilibrium spectrum Non equilibrium ionisation spectrum Sedov adiabatic SNR model Chevalier adiabatic SNR model with reverse shock Solinger isothermal SNR model Band isothermal SNR model with reverse shock Differential emission measure model polynomials Isobaric cooling flow model Power law differential emission measure with high T cut off Differential emission measure model for DEM analysis Reflection model of Zycki Table model from file multiplicative components shifts Redshift model multiplicative components convolutions Gaussian velocity profile Square velocity profile Ar
46. 2 1 and then let v do the scaling this also allows you to have v as a free parameter in spectral fits If one would instead want to describe a Gaussian profile for which of course also the vgau model exists one could for example approximate the profile by taking the x scale in units of the standard deviation an example with a resolution of 0 1 standard deviation and a cut off approximation at 5 standard deviations would be x 5 4 9 4 8 68 Spectral Models 4 8 4 9 5 0 with corresponding values for F given by F 0 0 00000048 0 00000079 0 99999921 0 99999952 1 The parameters of the model are v Velocity broadening parameter v in km s Default value 1 km s file Ascii character string containing the actual name of the vprof dat file 3 29 Wdem power law differential emission measure model This model calculates the spectrum of a power law distribution of the differential emission measure distribution It appears to be a good empirical approximation for the spectrum in cooling cores of clusters of galaxies It was first introduced by Kaastra et al 2004 and is defined as follows dY 0 if T lt T rains Bt md op if Tin lt T lt Thaxi 3 32 dT 0 if T gt Trax Here Y is the emission measure Y nyneV in units of 10 m where n and ny are the electron and Hydrogen densities and V the volume of the source For a oo we obtain the isothermal model for large a a steep temperature decline is
47. 3 20 1 Short description i4 Roe oe Rf eR eee ee GR Y ESE a 61 3 21 Powe Power law model 3 3 3 5 da taa eee oed e da eS 62 3 22 Reds redshift model 2 1 2a e rt a ss Bee a oe r0 A ee a 63 3 23 Refl Reflection model 2s 64 3 24 Rrc Radiative Recombination Continuum model 64 3 25 Spln spline continuum model 2 22 65 3 26 Vblo Rectangular velocity broadening model 66 3 27 Vgau Gaussian velocity broadening model 67 3 28 Vpro Velocity profile broadening model len 67 3 29 Wdem power law differential emission measure model 68 CONTENTS 5 4 More about plotting 69 4 1 Plot devices s uo e rus aruba ea ad aa a a a 69 42 Plot types os 24 28 he S asa GU rs a REOR EA 69 ALS Plot COlOUTS si a eidcm eR abus a a ed n tes BG a 70 4 4 Plot line typ s s pws eco idas da rd 72 45 Plot tekte esse qoo eR a a e a Aa a 73 25 1 Font types A II 73 215 2 Font heights fh 222 225 224 56425 da ee ood SC ROS RES 74 4 5 3 Special characters i e e a a a a E a a a e E 74 4 6 Plot Captions s gos k aa GOR SE a e eg ee eae 76 AT Plot symbols xs maos 234 see 4S aD da a 77 4 8 Plot axis units and scales gt 3 god dae PS i ee ew a HAO 78 4 8 1 Plot aXis Units ox bea eh eee Oe ee ee ECE ROS og ae E 78 4 8 2 Plotraxis scaleS ee e ok eR he Re REE OES oo 6 eS Ge PE 78 5 Response matrices 83 5 1 Respons matric s 2 4 4 24 3G ea wo
48. 6 Syntax overview width On top of specifying the S N ratio you also specify the minimal bin width This is useful for rebinning low count data which have no strong or sharp features or lines in it WARNING For high resolution spectra with sharp and strong lines this binning can lead to very wrong results In this case either the emission lines or the continuum in case of absorption lines have a much higher signal to noise ratio than the other component As a result this function will try to bin the line and continuum together resulting in a smoothing out of the lines WARNING It is not always guaranteed that the minimum signal to noise ratio is obtained in all channels This is an effect of the applied algorithm Channels with the highest S N ratio and neighboring bins are merged until sufficient S N ratio is obtained This process is continued for the remaining number of bins At the end of the process a few bins with a low S N ratio will remain These are merged with their neighbors resulting in a possibly lower S N ratio for that bin Syntax The following syntax rules apply vbin il 742 r Simplest command allowed i1 is the range in data channels over which the binning needs to take place 12 in the minimum amount of data channels that need to be binned and r is the minimal S N ratio one wants the complete data set to have vbin rl i 12 unit 4a The same command as above except that now the ranges over which the data
49. 8 76 8 69 4 56 4 48 4 53 4 46 8 08 8 08 7 95 7 87 6 83 6 32 6 37 6 30 7 58 7 58 7 62 7 55 6 47 6 49 6 54 6 46 7 55 7 56 7 61 7 54 5 45 5 56 5 54 5 46 7 21 7 20 7 26 7 19 5 5 5 28 5 33 5 26 6 52 6 40 6 62 6 55 5 12 5 13 5 18 5 11 6 36 6 35 6 41 6 34 320 3 10 3 15 3 07 5 02 4 94 5 00 4 92 4 00 4 02 4 07 4 00 5 67 5 69 5 72 5 65 5 39 5 53 5 58 5 50 7 51 7 50 7 54 7 47 4 92 4 91 4 98 4 91 6 25 6 25 6 29 6 22 4 21 4 29 4 34 4 26 4 60 4 67 4 70 4 63 abundance Ha Set the standard abundances to the values of reference a in the table above Examples abundance gs change the standard abundances to the set of Grevesse amp Sauval 1998 abundance reset reset the abundances to the standard set 2 2 Ascdump ascii output of plasma properties 13 2 2 Ascdump ascii output of plasma properties Overview One of the drivers in developing SPEX is the desire to be able to get insight into the astro physics of X ray sources beyond merely deriving a set of best fit parameters like temperature or abundances The general user might be interested to know ionic concentrations recombination rates etc In order to facilitate this SPEX contains options for ascii output Ascii output of plasma properties can be obtained for any spectral component that uses the basic plasma code of SPEX for all other components like power law spectra gaussian lines etc this sophistication is not needed and therefore not included There is a choice of pro
50. E dE 5 35 where the variable c denotes the observed see below photon energy and s has units of counts s keV The response function has the dimensions of an effective area and can be given in e g m The variable c was denoted as the observed photon energy but in practice it is some electronic signal in the detector used the strength of which usually cannot take arbitrary values but can have only a limited set of discrete values A good example of this is the pulse height channel for a CCD detector In almost all circumstances it is not possible to do the integration in eqn 5 35 analytically due to the complexity of both the model spectrum and the instrument response For that reason the model spectrum is evaluated at a limited set of energies corresponding to the same pre defined set of energies that is used for the instrument response R c E Then the integration in eqn 5 35 is replaced by a summation We call this limited set of energies the model energy grid or shortly the model grid For each 96 Response matrices bin j of this model grid we define a lower and upper bin boundary Ej and E as well as a bin centroid Ej and a bin width AE where of course E is the average of Ej and E and AE E Ej Provided that the bin size of the model energy bins is sufficiently smaller than the spectral resolution of the instrument the summation approximation to eqn 5 35 is in general sufficiently accurate The response
51. EM analysis tools see the dem commands of the syntax The CIE spectra are evaluated for a logarithmic grid of temperatures between T and T5 with n bins WARNING For the DEM methods to work the dem model is the only allowed additive component that can be present No other additive components are allowed But of course the spectrum of the dem model may be modified by applying any combination of multiplicative models redshifts absorptions line broadening etc WARNING Because of the above do not use the fit commands when you have a dem model If you really need to fit use the pdem model instead WARNING In general the spacing between the different temperature components should not be smaller than 0 10 in log T Smaller step sizes will produce unstable solutions The parameters of the model are tl Lower temperature T in keV Default value 0 001 keV t2 Upper temperature 75 in keV Default value 100 keV nr Number of temperature bins Default value 64 The following parameters are the same as for the cie model ed Electron density in 10 m it Ion temperature in keV vmic Micro turbulent velocity in km s ref Reference element 01 30 Abundances of H to Zn file Filename for the nonthermal electron distribution 3 9 Dust dust scattering model This model calculates the effective transmission of dust that scatters photons out of the line of sight No re emission is taken into account i e it is
52. H 4 a 4 2 E M 3 OL o J EE or Ju Milo 3 ES su 3 5 E pi 1 2 P BE EN HY ot J ii li l Ld j ip ee LY O O O N A 9 O 9 oO N N n Energy keV Energy keV Figure 5 9 Binning of the XMM RGS response Panels as for the Rosat PSPC data 5 9 References Arnaud K A 1996 Astronomical Data Analysis Software and Systems V eds Jacoby G and Barnes J p17 ASP Conf Series volume 101 Eisenhart C 1938 Bull Am Math Soc 44 32 Jerri A J 1977 Proc of the IEEE 65 1565 5 9 References 117 Kaastra J S Mewe R Nieuwenhuijzen H 1996 UV and X ray spectroscopy of astrophysical and laboratory plasmas eds K Yamashita and T Watanabe p 411 Univ Acad Press Shannon C E 1949 Proc IRE 37 10 Weiss P 1963 Am Math Soc Notices 10 351 118 Response matrices Chapter 6 Installation and testing 6 1 Testing the software After installing the software SPEX can be tested quickly as follows Goto the directory SPEX test Type the following in the terminal window spex log exe test quit The above should produce a plot mytest cps which should be identical to the file test cps in the same directory except for the date string Also at the end of your output on the terminal you should have the following except for machine dependent rounding errors Chi squared value 1009 59 Degrees of freedom 266 parameter Chi 2 Delta Delta valu
53. If n 999 replace the 999 by the relevant value for example if n 237 then the last y value is y237 3 26 Vblo Rectangular velocity broadening model This multiplicative model broadens an arbitrary additive component with a rectangular Doppler profile characterized by the half width v Therefore if a delta line at energy E is convolved with this component its full energy width will be 2Ev c and line photons get a rectangular distribution between E Ev c 3 27 Vgau Gaussian velocity broadening model 67 and E Ev c Of course any line or continuum emission component can be convolved with the this broadening model The parameters of the model are vblo Velocity broadening half width v in km s Default value 3000 km s 3 27 Vgau Gaussian velocity broadening model This multiplicative model broadens an arbitrary additive component with a Gaussian Doppler profile 2 jo 2 2 2 characterized by the Gaussian o The broadening kernel is therefore proportional to e c 20 E Eo Eg The parameters of the model are sig Gaussian velocity broadening c in km s Default value 1 km s 3 28 Vpro Velocity profile broadening model This multiplicative model broadens an arbitrary additive component with an arbitrarily shaped Doppler profile characterized by the half width v and a profile shape f x The resulting spectrum S F is calculated from the original spectrum S E as E ff d a S Eo dEo 3 28
54. In the first case the energy grid neede to evaluate the spectra is taken directly from the data set In the second case the user can choose his own energy grid The energy grid can be a linear grid a logarithmic grid or an arbitrary grid read from an ascii file It is also possible to save the current energy grid whatever that may be In case of a linear or logarithmic grid the lower and upper limit as well as the number of bins or the step size must be given The following units can be used for the energy or wavelength keV the default eV Ryd J Hz A nm When the energy grid is read or written from an ascii file the file must have the extension egr and contains the bin boundaries in keV starting from the lower limit of the first bin and ending with the upper limit for the last bin Thus the file has 1 entry more than the number of bins In general the energy grid must be increasing in energy and it is not allowed that two neighbouring boundaries have the same value Finally the default energy grid at startup of SPEX is a logarithmic grid between 0 001 and 100 keV with 8192 energy bins Syntax The following syntax rules apply egrid lin rl 12 i a Create a linear energy grid between r1 and r2 in units given by fa as listed above If no unit is given it is assumed that the limits are in keV The number of energy bins is given by i egrid lin r1 r2 step r3 a as above but do not prescribe the number of
55. Transmission Counts s amp 7 0 01 0 02 0 03 0 04 SES 0 0 SPEX User s Manual Jelle Kaastra Rolf Mewe 4 Ton Raassen N ra x Lx o u O vill 16 01 Fe XI 16 15 Observed wavelength Version 2 0 May 3 2007 Contents 1 Introduction 1 1 1 2 1 3 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 2 11 2 12 2 13 2 14 2 15 2 16 2 17 2 18 2 19 2 20 2 21 2 22 2 23 2 24 2 25 2 26 2 27 2 28 Preface Cc Sectors and regions o ss ee 1291 Introduction dos e E RE TEES T eee is Bw a oe Ge Be As amp 12 2 SKY SEC OES cc a A ee RA e Eo do ic 1 23 Detector regions soo qs eaa i e Different types of spectral components es Syntax overview Abundance standard abundances 00000 pee ene Ascdump ascii output of plasma properties oa oa a o e a ee Bin rebin the spectrum 2s Calculate evaluate the spectrum s cos sg ua tona a e aa Comp create delete and relate spectral components Data read response file and spectrum 2e DEM differential emission measure analysis o 0004 Distance set the source distance 2 2 a Egrid define model energy grids lee Elim set flux energy limits 0 020002 eee ee eee Error Calculate the errors of the fitted parameters Fit spectral hb ng se 3o Ree book ke OX kw Rer Evxcxk ROB OR Ex ORG 03 Ibal set type of ionisation balance 2e
56. V ev keV kev Rydbergs ryd Joules j Hertz hz and nanometers nm This is the most general command Examples syserr 1 100000 0 3 0 5 Calculates the combined Poissonian and systematic error for data channels 1 100000 where the fraction of the systematic error of the source is 0 3 and the background is 0 5 syserr 0 2000 0 3 0 5 unit ev The same as the above command expect that now the error calcu lation is performed between 0 and 2000 eV instead of data channels syserr instrument 2 region 1 0 2000 0 3 0 5 unit ev The same as the above command but now the error calculation is only performed for the data set from the second instrument and the first region thereof 2 29 System 43 2 29 System Overview Sometimes it can be handy if SPEX interacts with the computer system for example if you run it in command mode You might want to check the existence of certain file or run other programs to produce output for you and depending on that output you want to continue SPEX Therefore there is an option to execute any shell type commands on your machine using the fortran call system subroutine Another useful goody is the possibility to stop SPEX automatically if you find some condition to occur this might be useful for example if you have a program running that calls SPEX and depending on the outcome of SPEX you might want to terminate the execution This is achieved in SPEX by testing for the existence of a file with
57. ackground subtraction 2 27 Step Grid search for spectral fits Overview A grid search can be performed of x versus 1 2 3 or 4 parameters The minimum maximum and number of steps for each parameter may be adjusted Steps may be linear or logarithmic For each set of parameters a spectral fit is made using the last spectral fit executed before this command as the starting point For each step the parameters and x are displayed This option is useful in case of doubt about the position of the best fit in the parameter space or in cases where the usual error search is complicated Further it can be useful incases of complicated correlations between parameters WARNING Take care to do a spectral fit first WARNING Beware of the cpu time if you have a fine grid or many dimensions Syntax The following syntax rules apply step dimension i Define the number of axes for the search between 1 4 step axis il parameter i2 13 a range rl 12 n i4 Set for axis il optional sector i2 optional component i3 and parameter with name a the range to the number specified by r1 and 12 with a number of steps n given by i4 If n gt 0 a linear mesh between r1 and r2 will be taken for n lt 0 a logarithmic grid will be taken step Do the step search Take care to do first the step dimension command followed by as many step axis commands as you entered the number of dimensions Examples Below we give a wo
58. ag 0 cosmological redshift or 1 velocity redshift Default value 0 64 Spectral Models 3 23 Refl Reflection model This model was kindly provided by Piotr Zycki The related programs in XSPEC are FELIPL ans FERF SCHW The first one gives the reflected continuum i e PEXRAV PEXRIV plus the line with correct energy and intensity the second one is the first one with the relativistic smearing added Both are combined into the single refl model in SPEX It is a model of reflection from a constant density X ray illuminated atmosphere It computes the Compton reflected continuum cf Magdziarz amp Zdziarski 1995 and the iron K alpha line cf Zycki amp Czerny 1994 as described in Zycki Done amp Smith 1999 In addition it can be convolved with a relativistic diskline model for Schwarzschild geometry Chemical elements taken into account in this model are H He C N O Ne Mg Si S and Fe The standard abundances are taken from Morrison amp McCammon 1983 The incoming spectrum is characterized by N E AE exp E E 3 26 where E is the photon energy in keV N E the number of photons per per second per keV I is the photon index and E a cut off energy The normalisation A is in units of 1044 photonss keV at 1 keV just the same as in the standard power law model The total spectrum N F is then given by N E N E sR E 3 27 where R E is the reflected spectrum and s is a scaling factor
59. and is defined as the ratio of predicted count rate and model spectrum flux Response parts below 0 75 times the original photon energy are ignored in the estimation of the predicted count rate in an attempt to remove higher order spectral lines Note however that if your spectrum really contains significant higher order lines you cannot remove these from your plot Also beware of end effects If you want to see the underlying model it is often better to select the plot type model 4 8 2 Plot axis scales The axes in a plot can be plot in different ways either linear or logarithmic For the y axis we also have made an option for a mixed linear and logarithmic scale The lower part of the plot will be on a linear scale the upper part on a logarithmic scale This option is useful for example for plotting a background subtracted spectrum Often there are bins with a low count rate which scatter around zero after background suntraction for those channels a linear plot is most suited as a logarithmic scaling cannot deal with negative numbers On the other hand other parts of the spectrum may have a high count rate on various intemsity scales and in that case a logarithmic representation might be optimal The mixed scaling allows the user to choose below which y value the plot will be linear and also which fraction of the plotting surface the linear part will occupy For an example see Fig 4 8 2 4 8 Plot axis units and scales 79 bin kev ev
60. andard response matrix for the ASCA SIS detector uses a uniform model grid with a bin size of 10eV At a photon energy of 1 keV the spectral resolution FWHM of the instrument is about 50eV hence the line centroid of an isolated narrow line feature containing N counts can be determined with a statistical uncertainty of 50 2 35VN eV we assumed here for simplicity a Gaussian instrument response for which the FWHM is approximately 2 350 Thus for a moderately strong line of say 400 counts the line centroid can be determined in principle with an accuracy of 1 eV ten times better than the step size of the model energy grid If the true line centroid is close to the boundary of the energy bin there is a mis match shift of 5eV between the observed count spectrum and the predicted count spectrum at about the 5c significance level If there are more of these lines in the spectrum it is not excluded that never a satisfactory fit in a X sense is obtained even in those cases where we know the true source spectrum and have a perfectly calibrated instrument The problem becomes even more worrysome if e g detailed line centroiding is done in order to derive velocity fields like has been done e g for the Cas A supernova remnant A simple way to resolve these problems is just to increase the number of model bins This robust method always works but at the expense of a lot of computing time For CCD resolution spectra this is perhaps not a problem but wi
61. asma with 0 5 times solar abundances my is the mass of a hydrogen atom and A T is the cooling function We have calculated the cooling function A using our own SPEX code for a grid of temperatures and for 0 5 times solar abundances The spectrum is evaluated by integrating the above differential emission measure distribution between a lower temperature boundary T and a high temper ature boundary Tn We do this by creating a temperature grid with n bins and calculating the spectrum for each temperature WARNING Take care that n is not too small in case the relevant temperature is large on the other hand if n is large the computational time increases Usually a spacing with temperature differences between adjacent bins of 0 1 in log is sufficient and optimal WARNING The physical relevance of this model is a matter of debate The parameters of the model are norm The mass deposition rate M in Mo yr tl Lower temperature cut off temperature T Default 0 1 keV tn Upper temperature cut off temperature Ta Default 1 keV nr Number of temperature bins n used in the integration Default value 16 p Slope p 1 a Default 0 25 a 4 cut Lower temperature cut off in units of Tmax Default value 0 1 1 The following parameters are the same as for the cie model ed Electron density in 10 m it Ion temperature in keV vmic Micro turbulent velocity in km s ref Reference element 01 30 Abundances of H to
62. assumed that all scattered photons are lost from the line of sight This makes the model useful for instruments with a high spatial resolution i e the spatial resolution is much better than the typical size of the dust scattering halo Dust scattering is described for example by Draine 2003 In that paper a link is given to the website of Draine http www astro princeton edu draine dust dustmix html This website contains slightly updated cross sections for three cases as listed below The scattering is computed for a Carbonaceous Silicate Model for Interstellar Dust The cases are 1 set 1 for Ry 3 1 2 set 2 for Ry 4 0 56 Spectral Models 3 set 3 for Ry 5 5 WARNING For any instrument where the extraction region has a size comparable to the size of the dust scattering halo this model should not be used as the scattered X rays will fall within the exctraction region Take care when fitting data from different instruments simultaneously WARNING This model only calculates the dust scattering not the dust absorption The parameters of the model are nh Hydrogen column density in 1075 m Default value 1074 corresponding to 10 m a typical value at low Galactic latitudes f The covering factor of the absorber Default value 1 full covering set The set of cross sections being used See table above 3 10 Etau simple transmission model This model calculates the transmission T E between energie
63. at F x 0 and F x 1 Note that F x is dimensionless In addition we allow for two other parameters a scale factor s and an offset Ao Usually s 1 but if s is varied the resulting broadening scales proportional to s This is useful if for example one has an idea of the shape of the spatial profile but wants to measure its width directly from the observed grating spectrum In addition the parameter A can be varied if the absolute position of the source is unknown and a small linear shift in wavelength is necessary WARNING This model can be applied to grating spectra like RGS but if you include in your fit also other data for example EPIC the same broadening will also be applied to that other data SET Usually this effect is small for not too extended sources but it is worth taking this into consideration In future versions we intend to circumvent this problem WARNING The above approrimation of spatially extended sources assumes that there are no intrinsic spectral variations over the surface area of the X ray source Only total intensity variations over the surface area are taken into account Whenever there are spatial variations in spectral shape not in intensity our method is strictly speaking mot valid but still gives more accurate results than a point source approximation In principle in those cases a more complicated analysis is needed The parameters of the model are s Scale parameter s dimensionless Default val
64. ausing underflow or overflow For the last two units z and CZ it is necessary to specify a cosmological model Currently this model is simply described by Ho Qm matter density Q4 cosmological constant related density and Q radiation density At startup the values are Ho 70 km s Mpc Om 0 3 Qa 0 7 Q 0 0 i e a flat model with cosmological constant However the user can specify other values of the cosmological parameters Note that the distance is in this case the luminosity distance Note that the previous defaults for SPEX Ho 50 qo 0 5 can be obtained by putting Ho 50 Om 1 O4 0 and Q 0 WARNING when Ho or any of the Q is changed the luminosity distance will not change but the equivalent redshift of the source is adjusted For example setting the distance first to z 1 with the default H 70 km s Mpc results into a distance of 2 039 1079 m When Ho is then changed to 100 km s Mpc the distance is still 2 168 10 m but the redshift is adjusted to 1 3342 WARNING In the output also the light travel time is given This should not be confused with the luminosity distance in light years which is simply calculated from the luminosity distance in m Syntax The following syntax rules apply to setting the distance distance sector i 1 44a set the distance to the value fr in the unit a This optional distance unit may be omittted In that case it is assumed that the distance unit is the
65. based on the random variable k 2 x 5 Xn N pon 5 9 The hypothesis Ho will be rejected if X becomes too large In 5 9 k is the total number of data bins X has a central x distribution with k degrees of freedom if the hypothesis Ho is true and in the limit of large N However if H holds X no longer has a central x distribution It is straightforward to show that if f approaches fo then under the hypothesis H X has a non central x distribution with non central parameter 5 3 Data binning 87 k de N M pos 5 10 n 1 This result was derived by Eisenhart 1938 It is evident that A becomes small when f comes close to fo For A 0 the non central x distribution reduces to the classical central x distribution The expected value and variance of the non central x distribution are simply k and 2k 4A4 respectively We now need to find out a measure how much the probability distribution of X under the assumptions H and H differ The bin size A will be acceptable if the corresponding probability distributions for X under Hp a central x distribution and H a non central x distribution are close enough Using the x test Ho will in general be rejected if X becomes too large say larger than a given value Ca The probability a that Ho will be rejected if it is true is called the size of the test Let us take as a typical value a 0 05 The probability that Ho will be rejected if H is true is cal
66. bin boundaries often do not have energy units it may be for example a detector voltage or for grating spectra a detector position However given a proper response However given a corresponding response matrix there is a one to one mapping of photon energy to data channel with maximum response and it is this mapping that needs to be given here In the case of only a single data channel e g the DS detector of EUVE one might simply put here the energies corresponding to the FWHM of the response Another reason to put the data bin boundaries in the spectral file and not in the response file is that the response file might contain several components all of which relate to the same data bins And finally it is impossible to analyse a spectrum without knowing simultaneously the response Therefore the spectral analysis program should read the spectrum and response together As a last step we must deal with multiple spectra i e spectra of different detector regions that are related through the response matrix In this case the maximum number of FITS file extensions of 1000 is a much smaller problem then for the response matrix It is hard to imagine that anybody might wish to fit more than 1000 spectra simultaneously but maybe future will prove me to be wrong An example could be the following The supernova remnant Cas A has a radius of about 3 With a spatial resolution of 10 this would offer the possibility of analysing XMM EPIC spectra of 1018
67. bins but the bin width r3 In case the difference between upper and lower energy is not a multiple of the bin width the upper boundary of the last bin will be taken as close as possible to the upper boundary but cannot be equal 2 10 Elim set flux energy limits 23 to it egrid log rl r2 i a Create a logarithmic energy grid between r1 and r2 in units given by Ha as listed above If no unit is given it is assumed that the limits are in keV The number of energy bins is given by 1 egrid log rl 412 step r3 a as above but do not prescribe the number of bins but the bin width in log E r3 egrid read a Read the energy grid from file a egr egrid save fa Save the current energy grid to file a egr WARNING The lower limit of the energy grid must be positive and the upper limit must always be larger than the lower limit Examples egrid lin 5 38 step 0 02 a create a linear energy grid between 5 38 with a step size of 0 02 egrid log 2 10 1000 create a logarithmic energy grid with 1000 bins between 2 10 keV egrid log 2 10 1000 ev create a logarithmic energy grid with 1000 bins between 0 002 0 010 keV egrid read mygrid read the energy grid from the file mygrid egr egrid save mygrid save the current energy grid to file mygrid egr 2 10 Elim set flux energy limits Overview SPEX offers the opportunity to calculate the model flux in a given energy interval for the current s
68. bitrary velocity profile needs input file Spatial profile modeling for RGS needs input file Laor relativistic line profile multiplicative components absorption transmission Morrison amp McCammon ISM absorption EUVE absorption model Rumph et al H He SPEX absorption by plasma in CIE absorption by a slab with adjustable ionic columns absorption by a slab in photoionization equilibrium absorption by a slab with continuous distribution in ionization transmission piecewise power law where now E is the photon energy in keV T the temperature in keV and e is the elementary charge in Coulomb Inserting numerical values and multiplying by the emitting area A we get N E 9 883280 x 10 E A e 1 3 3 where N E is the photon spectrum in units of 10 photons s keV and A the emitting area in 1016 m The parameters of the model are norm Normalisation A the emitting area in units of 1016 m Default value 1 t The temperature T in keV Default value 1 keV 3 4 Cf isobaric cooling flow differential emission measure model 51 3 4 Cf isobaric cooling flow differential emission measure model This model calculates the spectrum of a standard isobaric cooling flow The differential emission measure distribution dY T dT for the isobaric cooling flow model can be written as 5Mk D T aY 1 aT ay 3 4 where M is the mass deposition rate k is Boltzmann s constant y the mean molecular weight 0 618 for a pl
69. cale calibration errors effective area errors for example but other applications can also be made of course For example if the spectrum of the source has an unknown continuum shape with a superimposed absorption model it is a good trick to model the continuum by a power law modify that by a knak model with adjustable or fixed transmission at some relevant energies and then apply the absorption An example of this last application can be found in Porquet et al 2004 The Transmission is given by T E c Edi if F lt E lt yas 3 15 for each value of i between 0 and n the number of grid points The transmission is 1 for E lt E and E gt E Further instead of using the constants c and a we use instead the values of the transmission at E ie T T E c Ej i This allows for a continuous connection between neighbouring segments Finally for historical reasons we use here a wavelength grid instead of an energy grid the corresponding nodes A should therefore be in strictly increasing order 3 16 Laor Relativistic line broadening model 59 WARNING When applying this model take care that at least one of the n transmission values is kept fixed otherwise you may run the risk that your model is unconstrained for example if the normalisation of the continuum is also a free parameter The parameters of the model are n The number of grid points Maximum value is 9 wl Wavelength A A of the first grid poin
70. ch the data are being evaluated has a fine mesh step size is about 0 10 in log T finer is not usefull because uniqueness is no longer guaranteed with the additional constraint that the number of mesh points is at least n and not larger than 64 practical limit in order to avoid excessive cpu time 62 Spectral Models The emission measure distribution is then simply scaled in such a way that its sum over the fine mesh equals the total emission measure Y that went into the model WARNING At least one of the y values should be kept frozen during fitting when Y is a free parameter otherwise no well defined solution can be obtained If Y is fixed then all y can be free The parameters of the model are norm Normalisation i e total integrated emission measure Y in units of 10 m tl Lower temperature T in keV tn Upper temperature Tn in keV npol Number of temperature grid points n minimum value 2 maximum value 8 yl Relative contribution y at T y2 Relative contribution y2 at T5 3 y8 Relative contribution yg at Tg note that the higher contributions y are neglected if i gt n The following parameters are the same as for the cie model ed Electron density in 10 m it Ion temperature in keV vmic Micro turbulent velocity in km s ref Reference element 01 30 Abundances of H to Zn file Filename for the nonthermal electron distribution Note that the true emission measure on the finer mesh can
71. changing ne only SPEX still uses the previous value of the emission measure Y ngneV but spectral lines that are sensitive to the electron density will get different intensities Usually this occurs for higher densities for example under typical ISM conditions n 1 cm this is not an important effect 3 5 4 Non thermal electron distributions The effects of non thermal electron distribution on the spectrum can be included See Sect for more details 3 5 5 Abundances The abundances are given in Solar units Which set of solar units is being used can be set using the var abun command see Sect 2 31 For spectral fitting purposes it is important to distinguish two situations In the first case there is a strong thermal continuum Since in most circumstances the continuum is determined mainly by hydrogen and helium and the X ray lines are due to the other elements the line to continuum ratio is a direct measurement of the metal abundances compared to H He In this situation it is most natural to have the hydrogen abundance fixed and allow only for fitting of the other abundances as well as the emission measure In the other case the thermal continuum is weak but there are strong spectral lines Measuring for example the Fe abundance will give large formal error bars not because the iron lines are weak but because the continuum is weak Therefore all abundances will get rather large error bars and despite the fact of strong O a
72. cumvent this by cutting the summation at some finite n It is well known that for the x test to be valid the expected number of events in each bin should not be too small The summation could be stopped where N Pon becomes a few However 90 Response matrices since the largest contribution to e comes from the largest value of n the value of e2 will be a very steep function of the precise cut off criterion which is an undesirable effect An alternative solution can be obtained by using the Kolmogorov Smirnov test which is elaborated in the following section 5 3 7 The Kolmogorov Smirnov test Table 5 4 Maximum difference d for a gaussian Isf 0 1 2 3 4 5 6 if 8 6 106 10 1 279 10 92 9 853 10 10 2 857 1077 3 138 1075 1 318 1078 2 140 102 1 359 1071 Sons 10 3 413 1071 1369107 2 140 107 1 318 10 9 3 138 1075 2 857 1077 9 853 10 10 1 279 10 57 1 586 1 740 10 4 1 909 1074 2 079 1074 2 209 1074 2 202 1074 1 896 1074 1 139 1074 2 675 107 1 139 1074 1 896 1074 2 202 1074 2 209 1074 2 079 1074 1 909 1074 1 740 10 4 1 586 1074 A good alternative to the x test for the comparison of probability distributions is the Kolmogorov Smirnov test This powerful non parametric test is based upon the test statistic D given by D max S x F x 5 21 where S x is the observed cumulative distribution for the sample of size N Clearly if D is large F x is a bad representation of the
73. currently e 5 8 x 10 in unscaled units are put to the maximum value in order to prevent numerical overflow This implies that you get inaccurate results for low energies for example for a simple power law with T 2 the results including conversion factors for E lt 107 keV become inaccurate The parameters of the model are norm Normalisation A of the power law in units of 10 phs keV at 1 keV Default value 1 gamm The photon index I of the spectrum Default value 2 dgam The photon index break AT of the spectrum Default value 0 and frozen If no break is desired keep this parameter 0 and frozen e0 The break energy Eo keV of the spectrum Default value 101 and frozen b Smoothness of the break b Default 0 type Type of normalisation Type 0 default use A type 1 use L elow E in keV the lower limit for the luminosity calculation Default value 2 keV eupp s in keV the upper limit for the luminosity calculation Default value 10 keV Tkae care that Ez gt E lum Luminosity L between E and Ez in units of 10 W 3 22 Reds redshift model This multiplicative model applies a redshift z to an arbitrary additive component If a photon is emitted at energy E the redshift model will put it at energy 1 z E In addition a time dilatation correction is applied such that the spectrum S E expressed as photons s per bin is divided by 1 z However it is necessary to distinguish
74. d below 0 6 keV and above 2 keV is dominated by the effective area curvature upper right panel of fig 5 7 It is also seen that the original PSPC model energy grid has a rather peculiar variable bin size with sometimes a few very narrow bins apparently created in the neighbourhood of instrumental edges This causes the spikes in the number of model bins to be merged Note that this number is a quantity valid for only a single bin if e g a thousand bins need to be merged this means in practice that only the next few bins are merged since these next bins will have a more decent value of the number of bins to be merged Table 5 13 summarizes the gain in bin size as obtained after optimum binning of the data and response matrix The reduction is quite impressive 5 8 3 ASCA SISO For the ASCA SISO data I used the spectrum of the supernova remnant Cas A The spectrum was provided by J Vink and had a total count rate of 52 7 counts s with an exposure time of 6000 s There are 86 2 resolution elements in the spectrum which extended from 0 35 to 12 56keV The results are summarized in fig 5 8 In the effective number of events per data channel lower left panel clearly the strong spectral lines of Si S and Fe can be seen The present modelling shows that a slightly smaller bin size is needed near those lines right panels Contrary to the PSPC case for the SIS detector the optimum resolution of the model energy grid is dominated verywhere
75. d then this value should be used in the estimation of 7 A more serious problem is that the width of the Isf should be adjusted from to Vo 7 If the lsf is a pure Gaussian this can be done analytically however for a slightly non Gaussian lsf the true lsf should be convolved in general numerically with a Gaussian of width 7 in order to obtain the effective Isf for the 100 Response matrices particular bin and the computational burden is quite heavy On the other hand for f only a shift in the Isf is sufficient Therefore we recommend here to use the linear approximation fi The optimum bin size is thus given by 5 28 5 34 and 5 48 5 4 5 The effective area In the previous subsection we have seen how the optimum model energy grid can be determined taking into account the possible presence of narrow spectral features the number of resolution elements and the flux of the source There remains one other factor to be taken into account and that is the energy dependence of the effective area In the previous section we have considered merely the effect of the spectral redistribution rmf in XSPEC terms here we consider the arf If the effective area A E would be a constant A for a given model bin j and if the photon flux of the bin in photonsm s would be given by Fj then the total count rate produced by this bin would be simply A F This approach is actually used in the classical way of analysing spectra and it is jus
76. default SPEX unit of 10 m The distance is set for the sky sector range i When the optional sector range is omitted the distance is set for all sectors distance show displays the distance in various units for all sectors distance h0 r sets the Hubble constant Ho to the value Zr 22 Syntax overview distance om r sets the Qm parameter to the value r distance ol r sets the Qa parameter to the value r distance or r sets the Q parameter to the value Zr Examples distance 2 sets the distance to 2 default units i e to 2E22 m distance 12 0 pc sets the distance for all sectors to 12 pc distance sector 3 0 03 z sets the distance for sector 3 to a redshift of 0 03 distance sector 2 4 50 ly sets the distance for sectors 2 4 to 50 lightyear distance h0 50 sets the Hubble constant to 50 km s Mpc distance om 0 27 sets the matter density parameter Nm to 0 27 distance show displays the distances for all sectors see the example below for the output format SPEX gt di 100 mpc Distances assuming HO 70 0 km s Mpc Omega m 0 300 Omega Lambda 0 700 Omega r 0 000 Sector m A U ly pc kpc Mpc redshift cz age yr 1 3 086E 24 2 063E 13 3 262E 08 1 000E 08 1 000E 05 100 0000 0 0229 6878 7 3 152E 08 2 9 Egrid define model energy grids Overview SPEX operates essentially in two modes with an observational data set read using the data commands or without data i e theoretical model spectra
77. detector regions At the scale of 10 the responses of neighbouring regions overlap so fitting all spectra simultaneously could be an option Therefore it is wise to stay here on the conservative side and to write the all spectra of different detector regions into one extension As a result we propose the following spectral file format After the null primary array the first extension contains the number of regions for the spectra as well as a binary table with the number of data channels per region see table 5 11 This helps to allocate memory for the spectra that are stored as one continuous block in the second extension see table 5 12 5 8 examples 5 8 1 Introduction In this section I present some estimates of the optical binning for som e instruments The ideal situation would be to use the original software that generates the response matrices for these instruments in order to derive first the optimal binning and then to produce the response matrix in the formats as proposed here Instead I take here the faster approach to use spectra and responses in OGIP format and to derive the rebinned spectra and responses by interpolation This is less accurate than the direct method mentioned above but is sufficiently accurate for the present purposes A drawback is however that given a solid square response matrix it is difficult if not impossible to extract from that data the different instrumental components that contribute to the mat
78. doubt put fy 1 13 and r4 are the systematic errors as a fraction of the source and background spectrum respectively again both should be specified or omitted together Default values are 0 If 11 is true Poissonian noise will be added this is the default If 12 is true the background will be subtracted this is the default 2 27 Step Grid search for spectral fits 41 Examples simulate This simulates a new spectrum dataset with Poissonian noise and background subtraction with the same exposure time and background as the original data set simulate noise f As above but without Poissonian noise The nominal error bars are still plotted simulate back f As first example but now no background is subtracted simulate time 10000 1 Simulate for 10 s exposure time and the same background as the template spectrum simulate time 10000 0 2 Simulate for 10 s exposure time but with a 5 times more accurate sub tracted background the background errors are 5 times smaller simulate syserr 0 1 0 2 As before but with a systematic error of 10 of the source spectrum and 20 of the subtracted background spectrum added in quadrature simulate instrument 2 4 region 3 time 5000 1 syserr 0 05 0 01 noise f back f Simulate a spectrum for region 3 of instruments 2 4 with 5000 s exposure time t the nominal background error scaleng f 1 a systematic error of 5 of the source and 1 96 of the background no Poissonian noise and no b
79. duces again the number of matrix elements considerably since most of the non zero matrix elements are caused by the low resolution split events that need not a very fine energy mesh 5 o CN ee ahe CX E Jl 2 A s a gt por 3 Ou oF P idi 1 i r 3 o zi J zor p zt a Lu ce EE 4 a A 1 E EIE ES Ww y 7 o MA S xx J xok AT bel E NO So oor 3 4 Bx i W or 3 a LA 3 3 LETRA 3 oL E e E d J no 5 P j aoe A 3 E Ar J a E al Eel B S E i E EI E 3 eL i i ha 0 5 10 0 5 10 Energy keV Energy keV Figure 5 8 Binning of the ASCA SIS response Panels as for the Rosat PSPC data 5 8 4 XMM RGS data I applied the procedures of this paper also to a simulated RGS spectrum of Capella The original onboard 3x 3pixel binning produces 3068 data channels The OGIP response matrix used is the one provided by C Erd which was calculated for a smooth grid of 9300 model energy bins The calculation is done for a single RGS The spectrum has a count rate of 4 0 counts s with an exposure time of 80000 s After rebinning there remain only 1420 new data channels Most of these new data channels contain 2 old data channels only at the boundaries of the detector 3 old bins are taken together The number of resolution elements is 611 After rebinning from the original 3068 data channels 1420 remain The opt
80. e Rate 4 byte real TTYPE6 Back Rate The background count rate B that was subtracted from the raw source count rate in order to get the net source count rate in counts s 4 byte real TTYPE7 Err Back Rate The statistical uncertainty AB of Back Rate in counts s 4 byte real TTYPES Sys_Source Systematic uncertainty s as a fraction of the net source count rate 5 dimensionless 4 byte real TTYPE9 Sys_Back Systematic uncertainty p as a fraction of the subtracted background count rate B dimensionless 4 byte real TTYPE10 First True if it is the first channel of a group otherwise false 4 byte logical TTYPE11 Last True if it is the last channel of a group otherwise false 4 byte logical TTYPE12 Used True if the channel is to be used otherwise false 4 byte logical Table 5 13 Rebinning of Rosat PSPC data Parameter original final reduction OGIP value factor Data channels 256 15 5 9 Model bins 729 153 21 0 Matrix elements 186624 2295 1 2 114 Response matrices 10 FWHM keV 0 2 AE FWHM 1 Laal 0 01 0 03 0 1 2 Effective area m 0 1 0 02 ae 23 0 01 0 01 Bin size keV 100074 10 100 nbins 10 500 10002000 5090 Energy keV Energy keV Figure 5 7 Binning of the Rosat PSPC response Left panel from t
81. e log exe mydata that will run the command file mydata that contains all information regarding to the data sets read further data selection or binning etc This could be followed by a second line in run like log exe mymodel that runs the command file mymodel which could contain the set up for the spectral model and or parameters Also often used plot settings e g stacking of different plot types could easily placed in separate command files In order to facilitate the readability of the command files the user can put comment lines in the command files Comment lines are recognized by the first character that must be Also blank lines are allowed in the command file in order to enhance human readability In general all commands entered by the user are stored on the command file Exceptions are the commands read from a nested command file it is not necessary to save these commands since they are 2 17 Menu Menu settings 29 already in the nested command file Also help calls and the command to open the file log save a are not stored Before saving all commands are expanded to the full keywords in those cases where abbrevated com mands were used However for execution this is not important since the interpreter can read both abbrevated and full keywords When a command file is read and the end of file is reached the text Normal end of command file encountered is printed on the screen and execution of the calling
82. e response file should tell which sector number corresponds to a given part of the matrix Syntax The following syntax rules apply sector new Creates a new sector which can have its own model sector show Gives the number of sectors that are currently used sector copy i Copies the model for sector i to a new sector 2 25 Shiftplot shift the plotted spectrum for display purposes 39 sector delete i Deletes sector i Examples sector new Creates a new sector sector copy 2 Creates a new sector with the same spectral model as used in sector 2 This can be useful if the spectra of the different sectors are very similar in composition sector delete 3 Deletes sector number 3 2 25 Shiftplot shift the plotted spectrum for display purposes Overview This command shifts the observed spectrum as well as the model spectrum by adding a constant or by multiplying a constant as far as plots are concerned The true data files do not change so the shift is only for representational purposes There are basically two options indicated by the mode variable plotshift For plotshift 1 a constant shift is added to the plotted spectrum of a given part of the data for plotshift 2 the plotted spectrum is multiplied by the constant shift The multiplicative constant shift plotshift 2 is generally preferred for log log plots while for linear plots a constant additive shift plotshift 1 is preferred WARNING In the case of
83. e at most a maximum error given by 5 56 in the effective area This can be translated directly into an error in the predicted count rate by multiplying max by the photon flux F Alternatively dividing max by the effective area Ap at the bin center we get the maximum error in the predicted probability distribution for the resulting counts This maximum can be taken also as the maximum deviation 6 in the cumulative distribution function that we used in the previous sections in the framework of the Kolmogorov Smirnov tests Hence we write AE A Ej E Bec 5 57 Using the same theory as in the previous section we find an expression for the optimum bin size as far as the effective area is treated in the linear approximation compare with eqn 5 47 AE 8A E d pi ci ARI 9 25 5 58 FWHM lt Ej A Fwini 2 5 5 The proposed response matrix 101 The bin width constraint derived here depends upon the dimensionless curvature of the effective area A E A In most parts of the energy range this will be a number of order unity or less Since the second prefactor E FWHM is by definition the resolution of the instrument we see by comparing 5 58 with 5 47 that in general 5 47 gives the most severe constraint upon the bin width unless either the resolution gets small what happens e g for the Rosat PSPC detector at low energies or the effective area curvature gets large what may happen e g near the exponentia
84. e calculate command needs not to be given Syntax The following syntax rules apply calc Evaluates the spectral model 16 Syntax overview Examples calc Evaluates the spectral model 2 5 Comp create delete and relate spectral components Overview In fitting or evaluating a spectrum one needs to build up a model made out of at least 1 component This set of commands can create a new component in the model as well as delete any component Usually we distinguish two types of spectral components in SPEX The additive components correspond to emission components such as a power law a Gaussian emission line a collisional ionization equilibrium CIE component etc The second class dubbed here multiplicative components for ease consists of operations to be applied to the additive components Examples are truly multiplicative operations such as the Galactic absorption where the model spectrum of any additive component should be multiplied by the transmission of the absorbing interstellar medium warm absorbers etc Other operations contained in this class are redshifts convolutions with certain velocity profiles etc The user needs to define in SPEX which multiplicative component should be applied to which additive components and in which order The order is important as operations are not always communative This setting is also done with this component command If multiple sectors are present in the spectral model or respo
85. e grid must be monotonically increasing two subsequent energies may not have the same value Also the spectrum S must be strictly positive i e S 0 is not allowed SPEX then calculates the spectrum by linear interpolation in the log E log S plane this is why fluxes must be positive For E lt E and E gt E however the spectrum is put to zero Finally the spectrum is multiplied by the scale factor N prescribed by the user The parameters of the model are norm Normalisation factor N Default value 1 file The file name of the file containing the spectrum 3 13 Gaus Gaussian line model The Gaussian line model is the simplest model for a broadened emission line The spectrum is given by F E Ae E Bo 20 3 14 where E is the photon energy in keV F the photon flux in units of 1044 phs keV Ep is the average line energy of the spectral line in keV and A is the line normalisation in units of 10 phs The total line flux is simply given by A Further c is the Gaussian width which is related to the full width at half maximum FWHM by FWHM ov 1n256 or approximately FWHM 2 35480 To ease the use for dispersive spectrometers gratings there is an option to define the wavelength instead of the energy as the basic parameter The parameter type determines which case applies type 0 default corresponding to energy type 1 corresponding to wavelength units WARNING Do not confuse o with FWHM when interpret
86. e multiplication of the constants For example after multiplying the response matrix by a factor of 2 the original matriz is recovered by multiplying the intermediate result by 0 5 WARNING The instrument number must be given in this command even if you use only a single instru ment 2 20 Obin optimal rebinning of the data 31 Syntax The following syntax rules apply multiply 11 component 3 12 r Multiplies the response matrix of component i2 of instrument il by a constant r Examples multiply 1 3 5 Multiplies the response matrix from instrument 1 by a factor of 3 5 multiply 1 component 2 3 5 Multiplies the second component of instrument 1 by the constant 3 5 2 20 Obin optimal rebinning of the data Overview This command rebins a part of the data thus both the spectrum and the response to the optimal bin size given the statistics of the source as well as the instrumental resolution This is recommended to do in all cases in order to avoid oversampling of the data The theory and algorithms used for this rebinning ared escribed in detail in Sect A simple cartoon of this is binning to 1 3 of the FWHM but the factor of 1 3 depends weakly upon the local count rate at the given energy and the number of resolution elements The better the statistics the smaller the bin size Syntax The following syntax rules apply obin il Simplest command allowed il is the range in data channels over which the bin
87. e sees that for N 10000 one needs to bin the model spectrum by about 0 01 times the FWHM A further refinement can be reached as follows Instead of putting all photons at the bin center we can put them at their average energy This first order approximation can be written as 2 12959 0 0040 0 55505 5 43 f E NO E Es 5 44 where E is given by E j E J f E EdE 5 45 Ej In the worst case for approximation fo namely a narrow line at the bin boundary the approximation f yields exact results In fact it is easy to see that the worst case for f is a situation with two lines 5 4 Model binning 99 of equal strength one at each bin boundary In that case the width of the resulting count spectrum 1 will be broader than c Again in the limit of small AE it is easy to show that the maximum error 6 for f to be used in the Kolmogorov Smirnov test is given by 1 AE 5 46 1 BUND GU 940 where e is the base of the natural logarithms Accordingly the limiting bin size for f is given by AE 0 5 ar 0 25 L e E FWHM lt 2 4418 A R N 5 47 Exact results are plotted again in fig 5 6 The better numerical approximation is AE FWHM It is seen immediately that for large N the approximation f requires a significantly smaller number of bins than fo We can improve further by not only calculating the average energy of the photons in the bin the first moment of the photon distribut
88. e value parameter Chi 2 5 66249 1010 50 6 613350E 02 0 91 5 59636 1013 28 0 132267 3 69 5 65690 1010 66 7 172966E 02 1 07 5 63537 1011 41 9 326029E 02 1 81 5 63051 1011 60 9 811878E 02 2 01 5 63117 1011 58 9 745693E 02 1 98 5 79476 1010 45 6 613350E 02 0 85 5 86089 1012 87 0 132267 3 27 5 80945 1010 87 8 082247E 02 1 27 5 82815 1011 43 9 951925E 02 1 83 5 83308 1011 62 0 104452 2 03 5 83240 1011 59 0 103778 2 00 Parameter 5 7286 Errors 9 74569E 02 0 10378 Normal end of SPEX You made 1 errors Thank you for using SPEX STOP The above test run is a simple single temperature fit to the MOS1 spectrum of an annulus in the cluster of galaxies A 1795 120 Installation and testing Chapter 7 Acknowledgements 7 1 Acknowledgements We would like to express our special thanks to numerous people who have substantially contributed to the development of various aspects of this work in alphabetical order Frans Alkemade Gert Jan Bartelds Ehud Behar Alex Blustin Irma Eggenkamp Andrzej Fludra Ed Gronenschild Theo Gunsing Jorgen Hansen Wouter Hartmann Kurt van der Heyden Fred Jansen Jelle Kaastra Jim Lemen Duane Liedahl Pasquale Mazzotta Rolf Mewe Hans Nieuwenhuijzen Bert van den Oord Ton Raassen Hans Schrijver Karel Schrijver Janusz Sylwester Rob Smeets Katrien Steenbrugge Jeroen Stil Dima Verner Jacco Vink Frank van der Wolf During the years the many people have contributed as follows Most software is
89. e warning above comp relation il 412 i3 4in Apply multiplicative components 13 fin num bers in this order to the additive components given in the range i2 of sectors in the range 2 6 Data read response file and spectrum 17 gt i1 optional Note that the multiplicative components must be separated by a Examples comp pow Creates a power law component for modeling the spectrum for all sectors that are present comp 2 pow Same as above but now the component is created for sector 2 comp 4 6 pow Create the power law for sectors 4 5 and 6 com abs Creates a Morrison amp McCammon absorption component comp delete 2 Deletes the second created component For example if you have 1 pow 2 cie and 3 gaus this command delets the cie component and renumbers 1 pow 2 gaus comp del 1 2 In the example above this will delete the pow and cie components and renum bers now 1 gaus comp del 4 6 2 If the above three component model pow cie gaus would be defined for 8 sectors numbered 1 8 then this command deletes the cie component nr 2 for sectors 4 6 only comp rel 1 2 Apply component 2 to component 1 For example if you have defined before with comp pow and comp abs a power law and galactic absorption the this command tells you to apply component 2 abs to component 1 pow comp rel 1 5 3 4 Taking component 1 a power law pow component 3 a redshift operation r
90. each component corresponding to a particular sky sector and detector region For example let us assume that the RGS has two response contributions one corresponding to the core of the lsf and the other to the scattering wings Let us assume that this instrument observes a triple star where the instrument cannot resolve two of the three components The total response for this configuration then consists of 12 components namely 3 sky sectors assuming each star has its own characteristic spectrum times two detector regions a spectrum extracted around the two unresolved stars and one around the other star times two instrumental contributions the lsf core and scattering wings 5 5 3 A response component We have shown in the previous section how for the combination of a particular source configuration and instrumental properties response matrix components can be defined In this subsection we investigate how to build such a matrix component Let us first return to our discussion on the optimum model energy grid binning For high resolution instruments the factor E FWHM in 5 60 is by definition large and hence for most energies the re quirements for the binning are driven by the model accuracy not by the effective area accuracy One might ask whether the approximation of a constant effective area within a model bin instead of the linear approximation 5 54 would not be sufficient in that case The reason is the following In order to acquire t
91. ectral Models can be transformed into an intensity J AA as function of wavelength using AX A0dA d0 Assume that the spatial profile 7 0 is only non zero within a given angular range i e the source has a finite extent Then we can transform J AA into a probability distribution f x with f 0 for very small or large values of z here and further we put z AA The resulting spatially convolved spectrum S A is calculated from the original spectrum S A as 5 0 f FA x 509 w 3 17 The function f x must correspond to a probability function i e for all values of z we have f z 20 3 18 and furthermore J f x dx 1 3 19 In our implementation we do not use f a but instead the cumulative probability density function F x which is related to f a by F x fly dy 3 20 where obviously F oo 0 and F oo 1 The reason for using the cumulative distribution is that this allows easier interpolation and conservation of photons in the numerical integrations If this component is used you must have a file available which we call here vprof dat but any name is allowed This is a simple ascii file with n lines and at each line two numbers a value for x and the corresponding F x The lines must be sorted in ascending order in x and for F x to be a proper probability distribution it must be a non decreasing function i e if F r F a 41 for all values of i between 1 and n 1 Furthermore we demand th
92. eds component 4 galactic absorption abs and component 5 a warm absorber warm this command has the effect that the power law spectrum is multiplied first by the transmission of the warm absorber 5 warm then redshifted 3 reds and finally multiplied by the transmis sion of our galaxy 4 abs Note that the order is always from the source to the observer comp rel 1 2 5 3 4 Taking component 1 a power law pow component 2 a gaussian line gaus and 3 5 as above this model applies multiplicative components 5 3 and 4 in that orer to the emission spectra of both component 1 pow and 2 cie comp rel 7 8 1 2 5 3 4 As above but only for sectors 7 and 8 if those are defined 2 6 Data read response file and spectrum Overview In order to fit an observed spectrum SPEX needs a spectral data file and a response matrix These data are stored in FITS format tailored for SPEX see section 5 7 The data files need not necessarily be located in the same directory one can also give a pathname plus filename in this command Syntax The following syntax rules apply data al 4a2 Read response matrix fal and spectrum Hal data delete instrument 4 Remove instrument i from the data set data merge sum i Merge instruments in range 1 to a single spectrum and response matrix by adding the data and matrices data merge aver i Merge instruments in range i to a single spectrum and response matrix 18 Syntax overview b
93. eds to be specified only on a model energy grid with ten times fewer bins as compared to the gaussian like core Thus by separating out the core and the scattering contribution the total size of the response matrix can be 102 Response matrices reduced by about a factor of 10 Of course as a consequence each contribution needs to carry its own model energy grid with it Therefore I propose here to subdivide the response matrix into its physical components Then for each response component the optimum model energy grid can be determined according to the methods de scribed in section 3 and this model energy grid for the component can be stored together with the response matrix part of that component Furthermore at any energy each component may have at most 1 response group If there would be more response groups the component should be sub divided further In X ray detectors other than the RGS detector the subdivision could be quite different For example with the ASCA SIS detector one could split up the response e g into 4 components the main diagonal the Si fluorescence line the escape peak and a broad component due to split events 5 5 2 More complex situations Outline of the problem In most cases an observer will analyze the data of a single source with a single spectrum and response for a single instrument However more complicated situations may arise Examples are 1 An extended source where the spectrum may be extracted f
94. els one wants to rebin If one wants to rebin the whole input file the range must be at least the whole range over data channels but a greater number is also allowed i is then the factor by which the data will be rebinned bin instrument il region i2 r i Here one can also specify the instrument and region to be used in the binning This syntax is necessary if multiple instruments or regions are used in the data input bin instrument i1 region i2 r i unit a In addition to the above here one can also specify the units in which the binning range is given The units can be eV or any of the other units specified above Examples bin 1 10000 10 Rebins the input data channel 1 10000 by a factor of 10 bin instrument 1 1 10000 10 Rebins the data from the first instrument as above bin 1 40 10 unit a Rebins the input data between 1 and 40 A by a factor of 10 2 4 Calculate evaluate the spectrum Overview This command evaluates the current model spectrum When one or more instruments are present it also calculates the model folded through the instrument Whenever the user has modified the model or its parameters manually and wants to plot the spectrum or display model parameters like the flux in a given energy band this command should be executed first otherwise the spectrum is not updated On the other hand if a spectral fit is done by typing the fit command the spectrum will be updated automatically and th
95. ematic offset The resulting uncertainties are unjustly treated as being statistical which can lead to wrong results when the systematic offsets are substantial Syserr should therefore be used with extreme caution WARNING One should first rebin the data before running syserr Run syserr however before fitting the data or finding errors on the fit WARNING Running syserr multiple times will increase the error every time If the input to syserr is wrong one should restart SPEX and rerun syserr with the correct values to calculate the total error cor rectly Syntax The following syntax rules apply syserr i r1 r2 The shortest version of this command i is the range in data channels for which the systematic error is to be calculated and added in quadrature to the Poissonian error r1 is then the the relative systematic error due to the source and r2 the relative systematic error due to the background syserr instrument il region 442 443 r1 r2 In this syntax one can also specify the instrument and the region one wants to calculate the combined error for Both can be ranges as well i3 has the same role as i in the above command and rl and r2 are the same as above syserr instrument il region i2 i3 11 r2 unit a Exact same command as above except that now the data range i3 for which the errors are to be calculated are given in units different than data channels These units can be A ang e
96. eously heated or cooled to a temperature T5 It then calculates the ionisation state and spectrum after a time t Obviously if t becomes large the plasma tends to an equilibrium plasma again at temperature T5 The parameters of the model are tl Temperature T before the sudden change in temperature in keV Default 0 002 keV t2 Temperature 75 after the sudden change in temperature in keV Default 1 keV u Ionization parameter U net in 10 m 3s Default 1074 The following parameters are the same as for the cie model ed Electron density in 10 m it Ion temperature in keV vmic Micro turbulent velocity in km s ref Reference element 01 30 Abundances of H to Zn file Filename for the nonthermal electron distribution 3 20 Pdem DEM models 3 20 1 Short description The pdem model is intended to be used for differential emission measure analysis simultaneous with fitting of abundances etc of an optically thin plasma It works as follows The user gives a a number of temperature grid points n a minimum temperature Ti a maximum temperature Tn a total emission measure Y and relative contributions yi yn SPEX assumes that the grid points between T and Tn are distributed logarithmically The relative contributions yi represents the values of dY dInT note the logarithm at the grid points SPEX then interpolates in the log 7 log y space on a finer grid using splines That temperature grid on whi
97. esponding to a particular region of the source for example a circular annulus centered around the core of a cluster or an arbitrarily shaped piece of a supernova remnant etc A sector may also be a point like region on the sky For example if there is a bright point source superimposed upon the diffuse emission of the cluster we can define two sectors an extended sector for the cluster emission and a point like sector for the point source Both sectors might even overlap as this example shows Another example the two nearby components of the close binary a Centauri observed with the XMM Newton instruments with overlapping point spread functions of both components In that case we would have two point like sky sectors each sector corresponding to one of the double star s components The model spectrum for each sky sector may and will be different in general For example in the case of an AGN superimposed upon a cluster of galaxies one might model the spectrum of the point like AGN sector using a power law and the spectrum from the surrounding cluster emission using a thermal plasma model 1 2 3 Detector regions The observed count rate spectra are extracted in practice in different regions of the detector It is necessary here to distinguish clearly the sky sectors and detector regions A detector region for the XMM EPIC camera would be for example a rectangular box spanning a certain number of pixels in the z and y directions It
98. f T positive values correspond to spectra decreasing with energy A spectrum with AT gt 0 therefore steepens softens at high energies for AT lt 0 it hardens 3 22 Reds redshift model 63 As an extension we allow for a different normalisation namely the integrated luminosity L in a given energy band E Ez3 If you choose this option the parameter type should be set to 1 The reason for introducing this option is that in several cases you may have a spectrum that does not include energies around 1 keV In that case the energy at which the normalisation A is determined is outside your fit range and the nominal error bars on A can be much larger than the actual flux uncertainty over the fitted range Note that the parameters E and E act independently from whatever range you specify using the elim command Also the luminosity is purely the luminosity of the power law not corrected for any transmission effects that you may have specified in other spectral components WARNING When you do spectral fitting you must keep either A or L a fixed parameter The other parameter will then be calculated automatically whenever you give the calculate or fit command SPEX does not check this for you If you do not do this you may get unexpected results crashes WARNING The conversion factor between L and A is calculated numerically and not analytically because of the possible break In the power law model photon fluxes above the nominal limit
99. f multiplied by the number of photons N For this situation we can easily evaluate e for a given binning If the spectrum is not mono energetic then the observed spectrum is the convolution of the lsf with the photon distribution within the resolution element and hence any sampling errors in the lsf will be more smooth smaller than in the mono energetic case It follows that if we determine e from the Isf this is an upper limit to the true value for e within the resolution element r In 5 10 the contribution to Ae for all bins is added The contribution of a resolution element r to the total is then given by N e where N must be the number of photons in the resolution element We keep here as a working definition of a resolution element the size of a region with a width equal to the FWHM of the instrument An upper limit to N can be obtained by counting the number of events within one FWHM and multiplying it by the ratio of the total area under the lsf should be equal to 1 to the area under the Isf within one FWHM should be smaller than 1 We now demand that the contribution to A from all resolution elements is the same Accordingly resolution elements with many counts need to have f closer to fo than regions with less counts If there are R resolution elements in the spectrum we demand therefore for each resolution element r 5 3 Data binning 89 the following condition Aer Nr mASQR 5 17 with kr a 2 Pon 5 18 where
100. f spectral bins in the data set and nr is the number of temperature components in the DEM library dem reg auto r As above but for the scaling factor s set to r dem reg r Do DEM analysis using the regularization method using a fixed regularization parameter R r dem chireg rl r2 i Do a grid search over the regularization parameter R with i steps and R distributed logarithmically between r1 and r2 Useful to scan the y R curve when ever it is complicated and to see how much penalty negative DEM values there are for each value of R dem clean Do DEM analysis using the clean method dem poly i Do DEM analysis using the polynomial method where i is the degree of the polynomial dem mult 4i Do DEM analysis using the multi temperature method where i is the number of broad components 20 Syntax overview dem gene 411 412 Do DEM analysis using the genetic algorithm using a population size given by il maximum value 1024 and i2 is the number of generations no limit in practice after 100 generations not much change in the solution Experiment with these numbers for your practical case dem read fa 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 10 m keV 1 The maximum number of data points in t
101. function for an X ray detector In this case the variable t denotes the energy In practice many response functions are not band limited example a Gaussian line profile It is common practice in those cases to neglect the Fourier power for frequencies above W and to reconstruct f t from this cut off Fourier transform The arguing is that for sufficiently large W the neglected power in the tail of the Fourier spectrum is small and hence 5 2 gives a fair approximation to the true signal The problem with such a treatment is that it is not obvious what the best choice for W and hence the bin size A is There are theorems which express the maximum error in f t in terms of the neglected power Weiss 1963 has derived an expression for the maximum error introduced see also Jerri 1977 5 3 Data binning 85 E f f lt f lolw dw 5 3 W One could now proceed by e g assuming that this maximum error holds over the entire range where a significant signal is detected and then depending upon the number of events used to sample f t determine W However this yields a large over estimation of the true error and hence a much smaller bin size than really necessary The point to make here is that 5 3 is only useful for continuous signals that are sampled at a discrete set of time intervals with no measurements in between However X ray spectra are sampled differently First the measured X ray spectrum is determined by counting individual p
102. g to true or false watch sub 1 set the flag that SPEX causes to report each major subroutine it enters or exits Examples watch time t set the time flag to true watch sub f set the subroutine report flag to false 48 Syntax overview Chapter 3 Spectral Models 3 1 Overview of spectral components For more information on the definition of spectral components and the different types see Sect 1 3 Currently the following models are implemented in SPEX see Table 3 1 3 2 Absm Morrison amp McCammon absorption model This model calculates the transmission of neutral gas with cosmic abundances as published first by Morrison amp McCammon 1983 It is a widely used model The following is useful to know when this model is applied 1 The location of the absorption edges is not always fully correct this can be seen with high resdo lution grating spectra 2 The model fails in the optical UV band i e it does not become transparent in the optical 3 No absorption lines are taken into account 4 The abundances cannot be adjusted If all the above is of no concern as is the case in many situations then the Morrison amp McCammon model is very useful In case higher precision or more detail is needed the user is advised to use the hot model with low temperature in SPEX which gives the transmission of a slab in collisional ionisation equilibrium The parameters of the model are nh Hydrogen column density in
103. ght hand of a will be placed at coord Other values can be used but are less useful plot string new rl r2 4a Plot a new string with text as specified in a at x rl and y 12 See Sect 4 5 for more deatils about text strings Also do not forget to put a between if it consists of more than one word i e if it contains spaces plot string del zzi Delete string numbers specified by the range i from the plot plot string i disp 1 If true default display the strings specified by the range i plot string i text a Change the text of strings 1 to fa plot string il col i2 Set the colours of strings il to i2 plot string il back 3412 Set the background colour for the strings il to the value 12 plot string il lw 3112 Set the line weight of strings il to 12 plot string i fh r Set the font height of strings i to r plot string il font i2 Set the font style of strings il to 12 plot string i x r Set the x position of strings i to r plot string i y r Set the y position of string i to r plot string i angle r Set the angle of strings i to r plot string i fjust r Controls justification of the strings i parallel to the specified edge of the viewport If r 0 0 the left hand of the strings will be placed at the position specified by x y above if r 0 5 the center of the strings will be placed at x y if r 1 0 the right hand of 1 wi
104. he data instead for the statistical weights in the fit fit method cstat Switch from x to C statistics fit method clas Switch back to x statistics 2 13 Ibal set type of ionisation balance Overview For the plasma models different ionisation balance calculations are possible Currently the default set is Arnaud amp Rothenflug 1985 for H He C N O Ne Na Mg Al Si S Ar Ca and Ni with Arnaud amp Raymond 1992 for Fe Table 2 5 lists the possible options Table 2 5 lonisation balance modes Abbrevation Reference default ar92 Arnaud amp Rothenflug 1985 Arnaud amp Raymond 1992 for Fe Arnaud amp Rothenflug 1985 for the other elements 2 14 Ignore ignoring part of the spectrum 27 Syntax The following syntax rules apply ibal a Set the ionisation balance to set a with fa in the table above Examples ibal reset Take the standard ionisation balance ibal ar85 Take the Arnaud amp Rothenflug ionisation balance 2 14 Ignore ignoring part of the spectrum Overview If one wants to ignore part of a data set in fitting the input model as well as in plotting this command should be used The spectral range one wants to ignore can be specified as a range in data channels or a range in wavelength or energy Note that the first number in the range must always be smaller or equal to the second number given If multiple instruments are used one must specify the instrument as well
105. he end points of the error bars to 7i plot elin lw i Set the line weight of the connecting line through the end points of the error bars to 7i plot elin his 1 If 1 is true plot the connecting line through the end points of the error bars in his togram format default is false plot model disp 1 If 1 is true plot the current model corresponding to the relevant data set default is true plot model col i Set the colour of the model to number 77i plot model lt i Set the line style of the model to number 1 plot model lw i Set the line weight of the model to number 77i plot model his 1 If 1 is true plot the model in histogram format default is true plot back disp 1 If 1 is true plot the subtracted background default is true plot back col 341 Set the colour of the subtracted background to number i plot back lt i Set the line style of the subtracted background to number i plot back lw i Set the line weight of the subtracted background to number i plot back his 1 If true plot the subtracted background in histogram format default is true plot fill disp 1 If 1 is true fill the curve below the model with the colour specified by the next command or the default colour plot fill col i Change the filling colour to 1 plot fill lt i Change the line type of the filling lines to i plot fill lw i Change the line weight of the filling lines to i plot fill style i Change t
106. he high accuracy we need to convolve the model spectrum for the bin approximated as a function centered around Ea with the instrument response In most cases we cannot do this convolution analytically so we have to make approximations From our expressions for the observed count spectrum s c eqns 5 35 and 5 36 it can be easily derived that the number of counts or count rate for data channel 7 is given by e I J dER c E f E 5 62 Cil 104 Response matrices where as before cj and cjg are the formal channel limits for data channel i and S is the observed count rate in counts s for data channel Interchanging the order of the integrations and defining the mono energetic response for data channel i by R E as follows Ri E I R c E dc 5 63 we have Si f aE EVR 5 64 From the above equation we see that as long as we are interested in the observed count rate 5 of a given data channel i we get that number by integrating the model spectrum multiplied by the effective area R E for that particular data channel We have approximated f E for each model bin j by 5 44 so that 5 64 becomes Si M FF 5 65 j where as before Ea is the average energy of the photons in bin j given by 5 45 and F is the total photon flux for bin j in e g photonsm s It is seen from 5 65 that we need to evaluate R not at the bin center E but at E j as expected Formally we may split up R E in an effect
107. he low density limit it the ion temperature T in keV Default value 1 rt the ratio of ionization balance to electron temperature Rp Ty T in keV Default value 1 vinic the micro turbulent velocity Umicro in km s Default value 0 ref reference element Default value 1 hydrogen See above for more details The value corresponds to the atomic number of the reference element 01 Abundance of hydrogen H Z 1 in solar units Default 1 02 Abundance of helium He Z 2 in solar units Default 1 30 Abundance of zinc Zn Z 30 in solar units Default 1 file Filename for the nonthermal electron distribution If not present nonthermal effects are not taken into account default 3 6 Dbb Disk blackbody model We take the model for a standard Shakura Sunyaev accretion disk The radiative losses from such a disk are given by 3GMM ri r Q PAE 3 6 8rr3 54 Spectral Models where Q is the loss term in W m at radius r M the mass of the central object M the accretion rate through the disk and r the inner radius If this energy loss is radiated as a blackbody we have Q o0T 3 7 with o the constant of Stefan Boltzmann and T r the local temperature of the blackbody The total spectrum of such a disk is then obtained by integration over all radii We do this integration numerically Note that for large r T r 3 4 WARNING A popular disk model diskbb in XSPEC assumes this temperature depende
108. he parameters of the model are varied in a fitting procedure in order to get the best solution This classical way of analysing X ray spectra has been widely adopted and is implemented e g in spectral fittting packages such as XSPEC Arnaud 1996 and SPEX Kaastra et al 1996 When high resolution data are available like in optical spectra the instrumental broadening is often small compared to the intrinsic line widths Instead of forward folding and fitting at each energy the observed spectrum is divided by the nominal effective area straightforward deconvolution Although straightforward deconvolution due to its simplicity seems to be attractive for high resolution X ray spectroscopy it might fail in several situations For example the grating spectrometers of EUVE have a high spectral resolution but it is not possible to separate the spectral orders at the longer wavelengths Therefore only careful instrumental calibration and proper modelling of the short wavelength spectrum can help A similar situation holds for the low energy gratings of AXAF For the RGS detector on board of XMM 30 of all line flux is contained in broad scattering wings due to the mirror and grating However the application of standard concepts like a response matrix is not at all trivial for these high resolution instruments For example with the RGS of XMM the properly binned response matrix has a size of 120 Megabytes counting only non zero elements T
109. he style of the filling lines to the value i Here i has values between 1 4 with the following meaning 1 solid filling default 2 outline 3 hatched 4 cross hatched plot fill angle r Set the angle for the filling lines for hatched filling Default is 45 degrees plot fill sep r Set the distance between the filling lines for hatched filling The unit spacing is 1 of the smaller of the height or width of the viewing surface This should not be zero plot fill phase r The phase between the hatch lines that fill the area plot data disp 1 If 1 is true display the data plot data errx 1 If 1 is true display the error bars in the x direction plot data erry 1 If 1 is true display the error bars in the y direction plot data col 44 Give the data colour index 1 plot data lt i Give the data line style i plot data lw i Give the data line weight i plot data fh r Give the symbols for the data font height r plot data symbol i Plot the data with symbol number i For symbol numbers see Sect 4 7 plot adum a overwrite append Dump the data and model in the plot in an ascii file with filename Ha The extension qdp will automatically be appended Note that the data will be written as they are i e if you have a logarithmic x axis or y axis the logs of the plotted quantities will be written If you want to replot your data later with for example the qdp package take care that you plot
110. hen a histogram is produced containing the number of events as a function of the energy or pulse height channel The bin size of these data channels ideally should not exceed the resolution of the instrument otherwise important information may be lost On the other hand if the bin size is too small one may have to deal with low statistics per data channel or with a large computational overhead caused by the large number of data channels In this section we derive the optimum bin size for the data channels We will start with the Shannon theorem and derive expressions for the errors made by using a particular bin size From these errors and the statistical noise on the data it is then possible to arrive at the optimum bin size 5 3 2 The Shannon theorem There is an important theorem which helps to derive the optimum binsize for any signal This is the Shannon 1949 sampling theorem also sometimes attributed to Nyquist This theorem states the fol lowing Let f t be a continuous signal Let g w be its Fourier transform given by oo g w J etat 5 1 00 If g w 0 for all w gt W for a given frequency W then f t is band limited and in that case Shannon has shown that f t ft fna EA 5 2 n co In 5 2 the bin size A 1 2W Thus a band limited signal is completely determined by its values at an equally spaced grid with spacing A We can translate the above Shannon theorem easily in terms of a response
111. his cannot be handled by most present day computer systems if analysis packages like XSPEC or SPEX are applied to these data sets Also the larger spectral resolution enhances considerably the computation time needed to evaluate the spectral 84 Response matrices models Since the models applied to AXAF and XMM data will be much more complex than those applied to data from previous missions computational efficieny is important to take into acount For these reasons we critically re evaluate the concept of response matrices and the way spectra are analysed In fact we conclude that it is necessary to drop the classical concept of a matrix and to use instead a modified approach First we evaluate the required binning for both the model and the data grid We also show how to properly handle different features like redshift components velocity broadening absorption edges etc The proper treatment of these effects is critically intermixed with the overall accuracy of the spectral model 5 3 Data binning 5 3 1 Introduction An important problem in data analysis is how the data should be sampled For example most X ray detectors are able to count the individual photons events that hit the detector A number of properties of the event like its arrival time position or energy may be recorded The electronics of most detectors operate in such a way that not the energy value or a related pulse height is recorded but a digitized version of it T
112. his file is 8192 Temperature should be in increasing order The data will be interpolated to match the temperature grid defined in the dem model which is set by the user 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 Zr is the full width of the filter expressed in 1 log T Note that this smoothing will in principle worsen the x of the solution but it is sometimes useful to wash out some residual noise in the DEM distribution preserving total emission measure Examples dem lib create the DEM library dem reg auto use the automatic regularization method dem reg 10 use a regularization parameter of R 10 in the regularization method dem chireg 1 e 5 1 e5 11 do a grid search using 11 regularisation parameters R given by 1075 1074 0 001 0 01 0 1 1 10 100 1000 10 105 dem clean use the clean method dem poly 7 use a Tth degree polynomial method dem gene 512 128 use the genetic algorithm with a population of 512 and 128 generations dem save mydem save the current dem on a file named mydem dem dem read modeldem read the dem from a file named modeldem dem dem smooth 0 3 smooth
113. hotons The energy of each photon is digitized to a discrete data channel number Therefore the measured X ray spectrum is essentially a histogram of the number of events as a function of channel number The essential difference with the previous discussion is that we do not measure the signal at the data channel boundaries but we measure the sum integral of the signal between the data channel boundaries Hence for X ray spectra it is more appropriate to study the integral of f t instead of f t itself This will be elaborated in the next paragraph 5 3 3 Integration of Shannon s theorem We have shown that for X ray spectra it is more appropriate to study the integrated signal instead of the signal itself Let us assume that the X ray spectrum f t represents a true probability distribution In fact it gives the probability that a photon will be detected at the data channel t The cumulative probability density distribution function F t is given by F t f x de 5 4 If we insert 5 4 into the Shannon reconstruction 5 2 we obtain after interchanging the integration and summation and keeping into mind that we cannot evaluate F t at all arbitrary points but only at those grid points mA for integer m where also fs is sampled A Z T Fs mA 2 f nd Si m m n 5 5 The function Si x is the sine integral as defined e g in Abramowitz amp Stegun 1965 It is an antisym metric function Si x Si x and for large
114. imal labeling 2 forced exponential labeling Default is 0 plot box numlab yscal i As above but for the y axis plot box tick invert x 1 Draw the tick marks on the x axis on the inside or outside the box set 1 to true for outside and false for inside default plot box tick invert y 1 Same as above but for the y axis plot box tick minor x 1 Draw minor tick marks on the x axis true false plot box tick minor y 1 Same as above but for the y axis plot box tick major x 1 Draw major tick marks on the x axis true false plot box tick major y 1 Same as above but for the y axis plot box tick distance x r Set the distance between the major labelled tick marks on the x axis to r plot box tick distance y r Same as above but for the y axis plot box tick subdiv x i Draw i minor tick marks between each major tick mark on the x axis plot box tick subdiv y i Same as above but for the y axis 36 Syntax overview plot box col i Set the box colour to colour number i See Sect 4 3 for the allowed plot colours plot box lt i Set the box line type to i See Sect 4 4 for allowed line types plot box lw i Set the box line weight to number 1 See Sect 4 4 for more about line weights plot box fh r Set the box font height to number i plot box font i Set the box font to number i See Sect 4 5 for more details about text fonts plot cap a disp 1 If 1 is true display the caption default For
115. imum model binning is completely dominated by the requirements for the model binning Effective area effects can be neglected fig 5 9 The 8 discrete features in several frames of this figure are artefacts due to the gaps between the 9 CCD detectors of each RGS This is due to the fact that we started with a pre fab OGIP type response matrix Table 5 15 summarizes the gain in bin size as obtained after optimum binning of the data and response matrix At first sight the reduction appears not to be too impressive This is however illusionary The classical OGIP response matrix that was used as the basis for my calculations is heavily under sampled 116 Response matrices Table 5 15 Rebinning of XMM RGS data Parameter original final reduction OGIP value factor 96 Data channels 3068 1420 46 3 Model bins 9300 5964 64 1 Matrix elements 2525647 783631 31 0 Would it have been sampled properly then the model energy grid should have a size of a few hundred thousand bins Since this causes the response matrix to be massive and disk consuming the undersampled matrix was created this matrix can be safely used for spectral simulations but is insufficient for flight data analysis It is exactly for that reason that the curren theoretical framework has been set up CURE E di m lt OE 3 E amp E Es o OL x ox pu o BL J for E 51 pr i 1 Set 2 mm
116. ined in the corresponding array y1 Y2 Yn These have the usual units of 10 photonss keV used throughout SPEX and is the spectrum emitted at the source The parameters y can be adjusted during the spectral fitting but b1 b2 and n and thereby x remain fixed At intermediate points between the x the photon spectrum is determined by cubic spline interpolation on the z yi data pairs We take a natural spline i e at x and n the second derivative of the spline is zero Outside of the range 61 59 however the photon spectrum is put to zero i e no extrapolation is made Finally note that we have chosen to define the spline in logarithmic space of y i e the log of the photon spectrum is fit by a spline This is done in order to guarantee that the spectrum remains non negative everywhere However the y values listed is the linear photon spectrum itself There are four different options for the energy grid x indicated by the parameter type e type 1 b is the lower energy in keV b is the upper energy in keV and the grid is linear in energy in between e type 2 b is the lower energy in keV b is the upper energy in keV and the grid is logarithmic in energy in between 66 Spectral Models e type 3 b is the lower wavelength in ba is the upper wavelength in and the grid is linear in wavelength in between e type 4 b is the lower wavelength in A ba is the upper wavelength in A and the grid is logarith
117. ing your fit results with other data WARNING When changing from energy to wavelength units take care about the frozen thawn status of the line centroid and FWHM WARNING You need to do a calc or fit command to get an update of the wavelength for type 0 or energy type 1 The parameters of the model are norm Normalisation A in units of 1044 phs Default value 1 e The line energy Ep in keV Default value 6 4 keV fwhm The line FWHM in keV type The type 0 for energy units 1 for wavelength units w The line wavelength A in A Default value 20 A awid The line FWHM in A 58 Spectral Models 3 14 Hot collisional ionisation equilibrium absorption model This model calculates the transmission of a plasma in collisional ionisation equilibrium with cosmic abundances For a given temperature and set of abundances the model calculates the ionisation balance and then determines all ionic column densities by scaling to the prescribed total hydrogen column density Using this set of column densities the transmission of the plasma is calculated by multiplying the transmission of the individual ions The transmission includes both continuum and line opacity For a description of what is currently in the absorption line database we refer to Sect sect absmodels You can mimick the transmission of a neutral plasma very easy by putting the temperature to 0 5 eV 0 0005 keV WARNING For solar abundances do not take
118. ion but also its variance the second moment In this case we approximate 2 4402 0 0561 1 95615 5 48 fo E N exp E Ea 27 5 49 where 7 is given by E j T J f E E Ea dE 5 50 Ej The resulting count spectrum is then simply Gaussian with the average value centered at E and the width slightly larger than the instrumental width e namely V6 7 The worst case for f again occurs for two lines at the opposite bin boundaries but now with unequal strength It can be shown again in the small bin width limit that 1 AE 62 p 5 51 36 67 Cc and that this maximum occurs for a line ratio of 6 3 1 The limiting bin size for f is given by AE 2 2 YEN US FWHM lt 2 2875 A R 5 52 Exact results are plotted again in fig 5 6 The better numerical approximation is AE way 22967 011677 2 7202 5 53 5 4 4 Which approximation to choose It is now time to compare the different approximations fo f and f2 as derived in the previous subsection It can be seen from fig 5 6 that the approximation f implies an order of magnitude or more improvement over the classical approximation fp However the approximation f is only slightly better than fi Moreover the computational burden of approximation f2 is large The evaluation of 5 50 is rather straightforward to do although care should be taken with single machine precision first the average energy E should be determined an
119. is the observed spectrum of a single X ray source There are however situations with more complex geometries Example 1 An extended source where the spectrum may be extracted from different regions of the detector but where these spectra need to be analysed simultaneously due to the overlap in point spread function from one region to the other This situation is e g encountered in the analysis of cluster data with ASCA or BeppoSAX Example 2 For the RGS detector of XMM Newton the actual data space in the dispersion direction is actually two dimensional the position z where a photon lands on the detector and its energy or pulse height E as measured with the CCD detector X ray sources that are extended in the direction of the dispersion axis are characterised by spectra that are a function of both the energy E and off axis angle The sky photon distribution as a function of E is then mapped onto the z E plane By defining appropriate regions in both planes and evaluating the correct overlapping responses one may analyse extended sources Example 3 One may also fit simultaneously several time dependent spectra using the same response e g data obtained during a stellar flare It is relatively easy to model all these situations provided that the instrument is understood sufficiently of course as we show below 8 Introduction 1 2 2 Sky sectors First the relevant part of the sky is subdivided into sectors each sector corr
120. isplacement A must be typically a small fraction of the natural width V2k of the x distribution The constant of proportionality p a f does not depend strongly upon o as can be seen from table 5 2 The dependence on f is somewhat stronger in the sense that if f approaches 1 p a f approaches 0 as it should be As a typical value we use the value of 0 3633 for a 0 05 and f 2 Combining 5 10 and 5 14 yields 2k p a DI ENTUM 5 15 where the probability weighted relative error e is defined by k es X Pondn 5 16 n 1 88 Response matrices Table 5 2 Scaling factors for the displacement parameter al f laf 0 27260 0 31511 0 36330 0 47513 0 09008 0 20532 0 36330 5 3 5 Extension to complex spectra The x test and the estimates that we derived hold for any spectrum In 5 15 N should represent the total number of counts in the spectrum and k the total number of bins Given a spectrum with pdf fo x and adopting a certain bin width A the Shannon approximation fi x can be determined and accordingly the value of e can be obtained from 5 16 By using 5 15 the value of N corresponding to A is found and by inverting this relation the bin width as a function of N is obtained This method is not always practical however First for many X ray detectors the spectral resolution is a function of the energy hence binning with a uniform bin width over the entire spectrum is not always desired An
121. istics for the spectral fitting for example maximum likelihood fitting Such methods are often based upon the number of counts in particular the difference between Poissonian and Gaussian statistics might be taken into account In order to allow for these situations also the exposure time t per 110 Response matrices Table 5 10 Third extension to the response file description EXTNAME RESP_RESP Contains the response matrix elements and their derivatives with respect to model energy The data are stored sequen tially starting at the lowest component within each com ponent at the lowest energy bin and within each energy bin at the lowest channel number NAXIS1 8 There are 8 bytes in one row NAXIS2 This number must be the sum of the NC values added for all model energy bins and all components the number of rows in the table TFIELDS 2 The table has 2 columns TTYPE1 Response The response values Fi o stored as a 4 byte real in SI units ie in units of m TTYPE1 Response_Der The response derivative values R 1 stored as a 4 byte real in SI units i e in units of m keV data channel is needed This exposure time needs not to be the same for all data channels for example a part of the detector might be switched off during a part of the observation or the observer might want to use only a part of the data for some reason Further in several situations the spectrum will contain a contribution fro
122. ive area part A E and a redistribution part 7 E in such a way that R E A E E 5 66 We have chosen our binning already in such a way that we have sufficient accuracy when the total effective area A E within each model energy grid bin j is approximated by a linear function of the photon energy E Hence the arf part of R is of no concern We only need to check how the redistribution rmf part i can be calculated with sufficiently accuracy For f the arguments go exactly the same as for A F in the sense that if we approximate it locally for each bin j by a linear function of energy the maximum error that we make is proportional to the second derivative with respect to E of 7 cf 5 56 In fact for a Gaussian redistribution function the following is straightforward to proove and is left here as an excercise for the reader Theorem 1 Assume that for a given model energy bin j all photons are located at the upper bin boundary Ej AE 2 Suppose that for all data channels we approximate f by a linear function of E the coefficients being the first two terms in the Taylor expansion around the bin center Ej Then the maximum error made in the cumulative count distribution as a function of the data channel is given by 5 47 in the limit of small AE The importance of the above theorem is that it shows that the binning for the model energy grid that we have chosen in section 2 is also sufficiently accurate so that T
123. k usually only the non zero matrix elements are stored and used This is done in order to save both disk space and computational time The procedure as used in XSPEC and the older versions of SPEX is then that for each model energy bin 7 the relevant column of the response matrix is subdivided into groups The groups are the continuous pieces of the column where the response is non zero In general these groups are stored in a specific order starting from the lowest energy all groups of a single energy are given before turning to the next higher photon energy This is not the optimal situation neither with respect to disk storage nor with respect to computational efficiency as is illustrated by the following example For the XMM RGS the response consists of a narrow gaussian like core with in addition a broad scattering component due to the gratings The FWHM of the scattering component is typically 10 times larger than that of the core of the response As a result if the response would be saved as a classical matrix we would end up with one response group per energy namely the combined core and wings response since these contributions have overlap namely in the region of the gaussian like core As a result the response becomes large being a significant fraction of the product of the total number of model energy bins times the total number of data channels This is not necessary since the scattering contribution with its ten times larger width ne
124. ke O00 aa ee aa A 83 5 2 Introduction sepia eek bok RE Su m m NX dn eee eee eae Ws 83 Deo Data Dinning xus deben RUE Boe ee e Ede eek er oe Se ee ed 84 gol Introduction eu ae 6 Geen goo Gm ark a Gare Se ee eS 84 5 3 2 The Shannon theorem 2s 84 5 3 3 Integration of Shannon s theorem 2222s 85 534 They test reari ere Ra ee ph eee eb Gh a Bo pee hsb 86 5 3 5 Extension to complex spectra 2 0 a ee 88 5 3 6 Difficulties with the y test o 46444464 02 b 9 oa bw ES 89 5 3 7 The Kolmogorov Smirnov test oaoa aaa en 90 5 9 9 Examples ioa x Sie oe pon a See See Po 92 5 3 9 Einmal remarks seca aie Sod Sos Re th A OBO Si ee v 94 5 4 Model binning se pecs 2 c 8 486 e 026 4803 46 3x cx ROPOR OY Be cojos 95 5 4 1 Model energy grid s cn a ra rattana eee ee ee 95 5 4 2 Evaluation of the model spectrum 0004 96 5 4 3 Binning the model spectrum 0 2000002 aes 97 5 4 4 Which approximation to choose 0 a 99 5 4 5 The effective area ees 100 5 4 6 Final remarks 4543 6280465444646 9 moo ox eos oa Pees 101 5 5 The proposed response Matrix 101 5 5 1 Dividing the response into components 2004 101 5 5 2 More complex situations oa rcs 102 5 0 3 A response Gomponent seors rore pom a RR ae eee e 103 5 6 Determining the grids in practice 2 105 5 6 1 Creating the data bins 2222s 105 5 6 2 creating the model bins
125. l cut offs caused by filters Large effective area curvature due to the presence of exponential cut offs is usually not a very serious problem since these cut offs also cause the count rate to be very low and hence weaken the binning requirements Of course discrete edges in the effective area should always be avoided in the sence that edges should always coincide with bin boundaries In practice it is a little complicated to estimate from e g a look up table of the effective area its curvature although this is not impossible As a simplification for order of magnitude estimates we can use the case where A E Age locally which after differentiation yields A 8 gps EA din A mee Inserting this into 5 58 we obtain AE dln E E 0 5 Ar 0 25 FW lt Y ua ori 9 qe 5 60 5 4 6 Final remarks In the previous two subsections we have given the constraints for determining the optimal model energy grid Combining both requirements 5 48 and 5 60 we obtain the following optimum bin size AE 1 SS SS ES 5 61 FWHM LI ee where w and tw are the values of AE FWHM as calculated using 5 48 and 5 60 respectively This choice of model binning ensures that no significant errors are made either due to inaccuracies in the model or effective area for flux distributions within the model bins that have E Ej 5 5 The proposed response matrix 5 5 1 Dividing the response into components When a response matrix is stored on dis
126. l wav 1 if true the default use the updated wavelengths for the Mekal code var newmekal fel7 1 if true the default use the updated Fe XVII calculations for the Mekal code var newmekal update 1 if true the default use the updates for some lines for the Mekal code synvar newmekal all lif true default use all the above three corrections for the Mekal code 2 31 3 Examples var gacc 0 01 Set the accuracy gfbacc for free bound emission to 0 01 var gacc reset Reset the accuracy gfbacc for free bound emission to its default value of 0 001 var line ex f Exclude electron excitation var line ds t Include dielectronic satellites var line reset Include all line emission processes var line show Show status of all line emission proceses var doppler f Do not use thermal Doppler bvroadening var calc new Use the new atomic data var newmekal wav f Use the original Mekal wavelengths instead var newmekal fei7 t Use the updated Fe XVII calculations var newmekal all f Go back to the full old Mekal code var newmekal all t Take the full updated Mekal code 2 32 Vbin variable rebinning of the data Overview This command rebins a part of the data thus both the spectrum and the response such that the signal to noise ratio in that part of the spectrum is at least a given constant Thus instead of taking a fixed number of data channels for binning the number of data channels binned is here variable as is the bin 4
127. led the power of the test and is denoted by 1 8 An ideal statistical test of Ho against H would also have 3 small large power However in our case we are not interested in getting the most discriminative power of both alternatives but we want to know how small A can be before the alternative distributions of X become indistinguishable In other words Prob X gt ca Hi fa Prob X gt c4 Ho a 5 12 where ideally f should be 1 or close to 1 For f 1 both distributions would be equal and A 0 resulting in A 0 We adopt here as a working value f 2 a 0 05 That is using a classical x test Ho will be rejected in only 5 of the cases and H in 10 of the cases In general we are interested in spectra with a large number of bins k In the limit of large k both the central and non central x distribution can be approximated by a normal distribution with the appropriate mean and variance Using this approximation the criterion 5 11 translates into k V2kqa k Ac 2k 429f0 5 13 where now qa is given by G qa 1 a with G the cumulative probability distribution of the standard normal distribution For the standard values we have q0 05 1 64485 and q0 10 1 28155 Solving 5 13 in the asymptotic limit of large k yields Ne V2K da ago pla f V2k 5 14 For our particular choice of a 0 05 and f 2 we have p a f 0 3633 Other values are listed in table 5 2 We see that the central d
128. letely neutral the model will crash This is because in that case the electron density becomes zero and the emission measure is undefined The nominal temperature limits that are implemented in SPEX usually avoid that condition but the results may depend somewhat upon the metallicity because of the charge exchange processes in the ionisation balance WARNING In high resolution spectra do not forget to couple the ion temperature to the electron temper ature as otherwise the ion temperature might keep its default value of 1 keV during spectral fitting and the line widths may be wrong WARNING Some people use instead of the emission measure Y nyneV the quantity Y n2V as normalisation This use should be avoided as the emission is proportional to the product of electron and ion densities and therefore use of Y makes the spectrum to depend nonlinear on the elemental abundances since an increase in abundances also affects the ne mg ratio The parameters of the model are norm the normalisation which is the emission measure Y nyneV in units of 10 m where ne and ny are the electron and Hydrogen densities and V the volume of the source Default value 1 t the electron temperature Te in keV Default value 1 sig the width c7 in logarithmic units Default value 0 no temperature distribution i e isothermal ed the electron density ne in units of 102 m7 or 101 cm Default value 10714 i e typical ISM conditions or t
129. ll be placed at x y Other values can be used but are less useful plot string i box 1 If 1 is true plot a box around the text strings i The default value is false no box plot string il box lt i2 Set the line style of the box around the strings 11 to the value 12 plot string il box lw i2 As above but for the line weight specified by i2 plot string i1 box col 412 As above but for the colour index for the box specified by i2 plot set i Selects data set numbers as specified by i Afterwards most plot commands will only affect data sets i plot set all Selects all data sets that are present All subsequent plot commands will be executed for all data sets plot line disp 1 If 1 is true plots a connecting line through the data points default is false plot line col i Set the colour of the connecting line to i plot line lt zi Set the line style of the connecting line to i 2 22 Plot Plotting data and models 37 plot line lw i Set the line weight of the connecting line to Zi plot line his 1 If 1 is true plot the connecting line in histogram format default is false plot elin disp 1 If 1 is true plots a connecting line through the end points of the error bars default depends upon the plot type plot elin col i Set the colour of the connecting line through the end points of the error bars to 7i plot elin lt i Set the line style of the connecting line through t
130. llow for the possibility of different values of Rp in order to mimick out of equilibrium plasmas For Ry lt 1 we have an ionizing plasma for Ry gt 1 a recombining plasma Note that for ionizing plasmas SPEX has also the nei model which takes into account explicitly the effects of transient time dependent ionization It is also possible to mimick the effects of non isothermality in a simple way SPEX allows for a Gaussian emission measure distribution y T E 0 x x0 2o7 Y 1 NT 3 5 where Y is the total integrated emission measure x logT and zp log Ty with To the average temperature of the plasma this is entered at the T value in SPEX Usually default r 0 and in that case the normal isothermal spectrum is chosen Note that for larger values of r the cpu time may become larger due to the fact that the code has to evaluate many isothermal spectra 3 5 2 Line broadening Apart from line broadening due to the thermal velocity of the ions caused by T gt 0 it is also possible to get line broadening due to micro turbulence In this case the line broadening is determined by Umicro which is given by Umicro v20 with 0 the Gaussian velocity dispersion in the line of sight Thus without thermal broadening the FWHM of the line would be 1 6651 times Umicro 3 5 3 Density effects It is also possible to vary the electron density ne of the plasma This does not affect the overall shape of the spectrum i e by
131. llowing polynomial RR A R Nu y 5 28 i 0 where the numbers a are given in table 5 6 Note the factor of 10 in the denominator The rms deviation of the approximation is less then 107 The corresponding value for Ca is plotted in fig 5 2 and is approximated with an rms deviation of 0 0004 by the polynomial 5 10 due oo 80D 5 29 i 0 where the numbers b are given in table 5 6 This approximation is only valid for the range 0 5 lt R lt 10 92 Response matrices O LL Lir an ran an ronal rra ronl L p iriri JD 700 100 7a 10 30 aor 10 409 io R Figure 5 1 Displacement Az as a function of the number of resolution elements R A polynomial approximation is given in the text Figure 5 2 Critical value c as a function of the number of resolution elements R A polynomial approximation is given in the text 5 3 8 Examples Let us apply the theory derived before to some specific line spread functions First we consider a Cauchy or Lorentz distribution given by 5 3 Data binning 93 Table 5 6 Coefficients for the approximations for Az and ca a m a z f x 5 30 where a is the width parameter The FWHM equals 2a Next we consider the Gaussian distribution given by 1 _ 2 9 2 fe e 20 5 31 270 with c the standard deviation The FWHM is given by vln 2560 which is approximately 2 35480 We have computed the value for 6 Az VN numerically for both
132. ly over the rebinning range In order to do that check determine for all k between and b 1 the minimum as of k by Extend the summation only from channel i to a 1 In the next step of the merging becomes the new starting value i The process is finished when a exceeds Ne creating the model bins After having created the data bins it is possible to generate the model energy bins Some of the information obtained from the previous steps that created the data bins is needed The following steps need to be taken 1 Sort the FWHM of the data bins in energy units W as a function of the corresponding energies Ejo Use this array to interpolate later any true FWHM Also use the corresponding values of N derived during that same stage Alternatively one may use directly the FWHM as obtained from calibration files Choose an appropriate start and end energy e g the nomimal lower and upper energy of the first and last data bin with an offset of a few FWHMs for a Gaussian about 3 FWHM is sufficient In the case of a lsf with broad wings like the scattering due to the RGS gratings it may be necessary to take an even broader energy range 5 7 Proposed file formats 107 3 In a loop over all energies as determined in the previous steps calculate 4 Ap R yN The value of A R is the same as used in the determination of the data channel grid 4 Determine also the effective area factor qag for each energy one
133. m background events The observed spectrum can be corrected for this by subtracting the background spectrum B scaled at the source position In cases where one needs to use Poissonian statistics including the background level this subtracted background B must be available to the spectral fitting program Also for spectral simulations it is necessary to include the background in the statistics The background can be determined in different ways depending upon the instrument For the spectrum of a point source obtained by an imaging detector one could extract the spectrum for example from a circular region and the background from a surrounding annulus and scale the background to be subtracted using the area fractions Alternatively one could take an observation of an empty field and using a similar extraction region as for ther source spectrum one could use the empty field observation scaled by the exposure times to estimate the background The background level B may also contain noise e g due to Poissonion noise in the background observa tion In some cases e g when the raw background count rate is low it is sometimes desirable to smooth the background to be subtracted first in this case the nominal background uncertainty AB no longer has a Poissonian distribution but its value can nevertheless be determined In spectral simulations one may account for the background uncertainty by e g simply assuming that the square of the background
134. may do that using a linear approximation 5 For the same energies determine the necessary bin width in units of the FWHM using eqn 5 61 Combining this with the FWHMs determined above gives for these energies the optimum model bin size AF in keV 6 Now the final energy grid can be created Start at the lowest energy E 1 and interpolate in the AE table the appropriate AE E 1 value for the current energy The upper bin boundary E of the first bin is then simply F1 AE E1 1 7 Using the recursive scheme Ej E 1 Eo Er AE E1 determine all bin boundaries untill the maximum energy has been reached The bin centroids are simply defined as E 0 5 E1 j E 5 8 Finally if there are any sharp edges in the effective area of the instrument it is necessary to add these edges to the list of bin boundaries All edges should coincide with bin boundaries 5 7 Proposed file formats In the previous sections it was shown how the optimum data and model binning can be determined and what the corresponding optimum way to create the instrumental response is Now I focus upon the possible data formats for these files For large data sets the fastest and most transparant way to save a response matrix to a file would be to use direct fortran or C write statements Unfortunately not all computer systems use the same binary data representation Therefore the FITS format has become the de facto standard in many fields of astron
135. mber of counts both source plus background of the current spectral model is used onwards in calculating the fit statistic Wheaton et al suggest to do the following 3 step process which we also recommend to the user of SPEX 1 first fit the spectrum using the data errors as weights the default of SPEX 2 After completing this fit select the fit weight model option and do again a fit 3 then repeat this step once more by again selecting fit weight model in order to replace s of the first step by s of the second step in the weights The result should now have been converged under the assumption that the fitted model gives a reasonable description of the data if your spectral model is way off you are in trouble anyway There is yet another option to try for spectral fitting with low count rate statistics and that is maximum likelyhood fitting It can be shown that a good alternative to x in that limit is C 22M si Ni Niln Ni s 2 2 i 1 26 Syntax overview This is strictly valid in the limit of Poissonian statistics If you have a background subtracted take care that the subtracted number of background counts is properly stored in the spectral data file so that raw number of counts can be reconstructed Syntax The following syntax rules apply fit Execute a spectral fit to the data fit print i Printing the intermediate results during the fitting to the screen for every n th step with n i most
136. mic in wavelength in between Note that the logarithmic grids can also be used if one wants to keep a fixed velocity resolution for broadened line features for example Further each time that the model is being evaluated the relevant values of the x grid points are evaluated WARNING Be aware that if you just set b b2 and n but do not issue the calc command or the fit command the x values have not yet been calculated and any listed values that you get with the par show command will be wrong After the first calculation they are right WARNING If at any time you change one of the parameters type b b2 or n the y values will not be appropriate anymore as they correspond to the previous set of x values The maximum number n of grid points that is allowed is 999 for practical reasons Should you wish to have a larger number then you must define multiple spln components each spanning its own disjunct b b range It should be noted however that if you take n very large spectral fitting may become slow in particular if you take your initial guesses of the y parameters not too close to the true values The reason for the slowness is two fold first the computational time for each fitting step is proportional to the number of free parameters if the number of free parameters is large The second reason is unavoidable due to our spectral fitting algorithm our splines are defined in log photon spectrum space if you s
137. more about captions see Sect 4 6 Here and below a can be x y z id lt or ut plot cap a col i Plot caption a in colour number i See Sect 4 3 for valid colour indices plot cap a back 341 Set the background colour for caption a to i plot cap fa lw i Set the font line weight for caption fa to i plot cap a fh r Set the font height for caption a to value r plot cap a font i Set the font type for caption a to i plot cap al text a Set the text for caption al to a2 Note that the caption text should be put between quotion marks like best fit results if you want to see the text best fit results plot cap fal side a2 Plot caption fal at the side of the frame specified by a2 which may stand for t top b bottom Ih left horizontal rh right horizontal lv left vertical and rv right vertical plot cap a off r Offset caption a by r from the edge of the viewport where r is in units of the character height Enter negative values to write inside the viewport plot cap a coord r Plot caption a along the specified edge of the viewport in units of the viewport length where 0 0 lt r lt 1 0 plot cap a fjust r Controls justification of the caption a parallel to the specified edge of the view port If r 0 0 the left hand of a will be placed at the position specified by coord above if r 0 5 the center of the string will be placed at coord if r 1 0 the ri
138. nce over the full disk However we correct it using the factor 1 y r r in Q which corresponds to the torque free condition at the inner boundary of the disk The photon spectrum of the disk is now given by 8r E r cosi N E wa EET refri 3 8 where is the inclination of the disk 0 degrees for face on disk 90 degrees for an edge on disk E the photon energy ro the outer edge of the disk and T is defined by T 3GM M 8rrio 3 9 and further the function fa y r is defined by T xdg faly r 3 10 1 where T x is defined by 7 x 1 1 4 z a In addition to calculating the spectrum the model also allows to calculate the average radius of emission Re at a specified energy E This is sometimes useful for time variability studies softer photons emerging from the outer parts of the disk Given the fit parameters T and r using 3 9 it is straightforward to calculate the product M M Further note that if r 6GM c it is possible to find both M and M provided the inclination angle i is known The parameters of the model are norm Normalisation A r cosi in units of 1016 m Default value 1 t The nominal temperature 7 in keV Default value 1 keV ro The ratio of outer to inner disk radius ro ri ener Energy E at which the average radius of emission will be calculated rav Average radius Re of all emission at energy E specified by the parameter above Note that
139. nce textpointer after plot ting the previous character NA Angstrom symbol A Xgr greek letter corresponding to roman letter x fn switch to Normal font fr switch to Roman font fi switch to Italic font fs switch to Script font n character number n see pgplot manual appendix B tab 1 Table 4 3 List of upper and lower case Greek letters G and their corresponding Roman letters R R A BIG EIZIY H I K L M NIC PIR S T U F X Q W s alo r A e z m o rx pr s o n P s r E R a b gld e z y h lk limi ng c piris t u f m qi w s a sls s elzlnlol e x plvlelele lelzle o xlo 4 5 2 Font heights fh The font height can be entered as a real number the default value is 1 A useful value for getting results that are still readable for publications is 1 3 Note that if you make the font height for the captions of the figure too large you may loose some text off the paper 4 5 3 Special characters The texts strings that are plotted may be modified using the pgplot escape sequences These are character sequences that are not plotted but are interpreted as instructions to change the font draw superscripts or subscripts draw non ASCII characters Greek letters etc All escape sequences start with a backslash character A list of the defined escape sequences is given in tab 4 2 A lookup table for Greek letters is presented in tab 4 3 Some useful non ASCII characters are listed in tab 4 4 Fig 4 4
140. nd Fe lines the formal error bars on the O Fe ratio becomes large This can be avoided by choosing another reference element preferentially the one with the strongest lines for example Fe Then the O Fe ratio will be well constrained and it is now only the H abundance relative to Fe that is poorly constrained In this case it is important to keep the nominal abundance of the reference element to unity Also keep in mind that in general we write for the normalisation nenxV in this case 3 6 Dbb Disk blackbody model 53 when the reference element is H you mays substitute X H however when it is another element like O the normalisation is still the product of nenxV where X stands for the fictitious hydrogen density derived from the solar O H ratio Example suppose the Solar O abundance is 1E 3 i e there is 0 001 oxygen atom per hydrogen atom in the Sun Take the reference atom oxygen Z 8 Fix the oxygen abundance to 1 Fit your spectrum with a free hydrogen abundance Suppose the outcome of this fit is a hydrogen abundance of 0 2 and an emission measure 3 in SPEX units This means nenxV 3 x 10 m Then the true emission measure nenyV 0 2 x 3 x 10 m The nominal oxygen emission measure is nenoV 0 001 x 3 x 10 m and nominally oxygen would have 5 times overabundance as compared to hydrogen in terms of solar ratios 3 5 6 Parameter description WARNING When you make the temperature too low such that the plasma becomes comp
141. nhanced and therefore you would expect the Si abundance to be enhanced in the same way as Fe With the par command you can set for each parameter individually or for a range of parameters in the same command their attributes value status range and coupling Also you can display the parameters on the screen or write them on a SPEX command file which allows you to start another run with the current set of parameters When setting parameters you can also specify the sector range and component range For your first call it is assumed that you refer to sector 1 component 1 first parameter In all subsequent calls of the parameter command it is assumed that you refer to the same sector s and component s as your last call unless specified differently This is illustrated by the following example Suppose you have the following model power law component 1 blackbody component 2 and RGS line broadening lpro component 3 If you type in the commands in that order this is what happens e par val 2 sets the norm first parameter of the power law to value 2 e par gam val 3 sets the photon index of the power law to value 3 e par 2 t val 2 5 sets the temperature of the blackbody to 2 5 keV e par norm val 10 sets the norm of the blackbody to 10 e par 1 2 norm v 5 sets the norm of both the PL and BB to 5 e par val 4 2 sets the norm of both the PL and BB to 4 2 e par 3 file myprofile dat sets for the LPRO c
142. ning needs to take place obin rl i unit a The same command as above except that now the ranges over which the data is to be binned r1 are specified in units a different from data channels These units can be eV keV A as well as in units of Rydberg ryd Joules j Hertz hz and nanometers nm obin instrument il region i2 443 Here i3 is the same as il in the first command However here one can specify the instrument range il and the region range i2 as well so that the binning is done only for one given data set obin instrument il region i2 r1 unit a This command is the same as the above except that here one can specify the range over which the binning should occur in the units specified by a These units can be eV A keV as well as in units of Rydberg ryd Joules j Hertz hz and nanometers nm Examples obin 1 10000 Optimally bins the data channels 1 10000 obin 1 4000 unit ev Does the same as the above but now the data range to be binned is given in eV from 1 4000 eV instead of in data channels obin oe 1 region 1 1 19 unit a Bins the data from instrument 1 and region 1 between 1 and 19 A 2 21 Par Input and output of model parameters Overview This command is used as an interface to set or display the parameters of the spectral model Each model parameter like temperature T abundance normalization etc has a set of attributes namely its value 32 Synta
143. nse matrix see Sect 1 2 then one has to specify the spectral components and their relation for each sector The possible components to the model are listed and described in Sect 3 Note that the order that you define the components is not important However for each sector the components are numbered starting from 1 and these numbers should be used when relating the multiplicative components to the additive components If you want to see the model components and the way they are related type model show WARNING If in any of the commands as listed above you omit the sector number or sector number range the operation will be done for all sectors that are present For example having 3 sectors the comp pow command will define a power law component for each of the three sectors If you only want to define delete relate the component for one sector you should specify the sector number s In the very common case that you have only one sector you can always omit the sector numbers WARNING After deleting a component all components are re numbered So if you have compo nents 1 2 3 for example as pow cie gaus and you type comp del 2 you are left with 1 pow 2 gaus Syntax The following syntax rules apply comp i a Creates a component a as part of the model for the optional sector range Hi comp delete i1 i2 Deletes the components with number from range i2 for sector range optional Zzil See also th
144. nt response is Gaussian centered at the true photon energy and with a standard deviation c Many instruments have line spread functions with Gaussian cores For instrument responses with extended wings e g a Lorentz profile the model binning is a less important problem since in the wings all spectral details are washed out and only the lsf core is important For a Gaussian profile the FWHM of the lsf is given by FWHM yIn 256 0 2 350 5 40 How can we measure the error introduced by using the approximation 5 39 Here we will compare the cumulative probability distribution function cdf of the true bin spectrum convolved with the instrumental Isf with the cdf of the approximation 5 39 convolved with the instrumental Isf The comparison is done using a Kolmogorov Smirnov test which is amongst the most powerful tests in detecting the difference between probability distributions and which we used successfully in the section on data binning We denote the Isf convolved cdf of the true spectrum by c and that of fo by do c By definition oo 0 and co 1 and similar for o Similar to section 5 3 we denote the maximum absolute difference between and o by Again Ag VNS should be kept sufficently small as compared to the expected statistical fluctuations VND where D is given again by eqn 5 21 Following section 5 3 further we divide the entire energy range into R resolution elements in each of which a KS test i
145. nt would be plot dev xs it is sufficient to type dev xs instead menu none Return to the normal SPEX prompt menu text par 1 2 All following commands wil get the par 1 2 keywords put in front of them The next command could be t val 4 which will be expanded to the full par 1 2 t val 4 to set the temperature of sector 1 component 2 to 4 keV Note that here the text has three keywords par 1 2 and hence it has to be put between to indicate that it is a single text string If there is only one keyword these are not necessary 2 18 Model show the current spectral model Overview This commands prints the current spectral model for each sector to the screen The model is the set of spectral components that is used including all additive and multiplicative components For all additive components it shows in which order the multiplicative components are applied to the additive emitted components See Sect 2 5 for more details Syntax The following syntax rules apply model show Prints the model for all sectors to the screen model show i Prints the model for sector i to the screen Examples model show 2 Prints the model for the second sector 2 19 Multiply scaling of the response matrix Overview This command multiplies a component of the response matrix by a constant WARNING If this command is repeated for the same component then the original response matrix is changed by th
146. nts by going back to the old code The improvements are classified as follows with the appropriate syntax word added here Wav wavelength corrections according to the work of Phillips et al 1999 based upon Solar flare spectra in addition the 1s np wavelengths of Ni XXVII and Ni XXVIII have been improved Fel7 The strongest Fe XVII lines are corrected in order to agree with the rates as calculated by Doron amp Behar 2002 Update several minor corrections the Si IX C7 line has been deleted the Si VIII N6 line now only has the 319 83 line strength instead of the total triplet strength the Ni XVIII and Fe XVI NalA and NAJIB lines plus their satellites have been deleted 2 31 2 Syntax The following syntax rules apply var gacc r Set the accuracy gfbacc for free bound emission Default is 107 maximum value 1 and minimum value 0 Do not change if you do not know what it does var gacc reset Reset gfbacc to its default value var line Ha 1 For process a where a is one of the abbreviations in Table 2 6 the process is allowed if 1 is true or disabled if 1 is false By default all processes are allowed var line reset Enable all line emission processes var line show Show the status of the line emission processses var doppler 1 Include Doppler broadeing the default if 1 is true or exclude it if 1 is false var calc old Use the old Mekal code var calc new Use the new updated atomic data var newmeka
147. o value i See Sect 4 3 for the allowed plot colours plot view transp 1 If true set the viewport background to to transparent the plot frame will be shown with the background colour selected by the plot view back command Default is false plot box disp 1 Display a box around the viewport true false plot box edge a 1 If true default display the edges of the plot box a should be one of the following keywords top bottom left right Note that whether you see the edges or not also depends on the settings defined by the plot box disp command plot box axis x 1 Plots an x axis with tickmarks at the line y 0 You only see this of course if your y range includes the value 0 plot box axis y 1 As above but for the y axis plot box grid x 1 Plot a grid for the x axis plot box grid y 1 Plot a grid for the y axis plot box ymix 1 Not implemented yet plot box numlab bottom 1 Show the tick number labels at the bottom of the plot true false plot box numlab top 1 Same as above but for the top plot box numlab left 1 Same as above but for the left plot box numlab right 41 Same as above but for the right plot box numlab vert 1 Plot the tick number labels on the y axis vertically or horizontally set 1 to true for vertical tnumbers and false for horizontal numbers plot box numlab xscal i Way to denote the numerical numbers along the x axis Three values are allowed 0 automatic 1 forced dec
148. of the fitted parameters Overview This command calculates the error on a certain parameter or parameter range if that parameter is thawn Standard the 1e rms error is calculated this is not equivalent to 68 96 as the relevant distributions are x and not normal So Ax is 2 for a single parameter error The Ay value can be set such that for instance 90 errors are determined SPEX determines the error bounds by iteratively modifying the parameter of interest and calculating x as a function of the parameter During this process the other free parameters of the model may vary The iteration stops when x x24 Ax where Ax is a parameter that can be set separately The standard errors of SPEX rms errors are for Ay 2 The iteration steps are displayed It is advised to check them because sometimes the fit at a trial parameter converges to a different solution branch therefore creating a discontinuous jump in x In those situations it is better to find the error bounds by varying the search parameter by hand Finally note that SPEX remembers the parameter range for which you did your lat error search This saves you often typing in sector numbers or component numbers if you keep the same spectral component for your next error search WARNING A parameter must have the status thawn in order to be able to determine its errors Syntax The following syntax rules apply error i1 i2 a Determine the error bars for
149. of the x test we now change our focus to the case of multiple resolution elements Suppose that in each of the R resolution elements we perform a Kolmogorov Smirnov test How can we combine the tests in the different regions For the x test we could simply add the contributions from the different regions For the Kolmogorov Smirnov test it is more natural to test for the maximum 0 6 max y N D 5 25 where as before N is the number of photons in the resolution element r and D is given by 5 21 over the interval r Note that the integral of S x and F 1 over the interval r should be 1 Our test statistic therefore combines normalized KS tests over each resolution element All the N D are independently distributed according to a KS distribution hence the cumulative distribution function for their maximum is simply the Rth power of a single stochastic variable with the KS distribution Therefore we obtain instead of 5 23 5 24 Fks ca 1 a 5 26 Fks c Ap 1 fa 527 The hypothesis Ho is rejected if 6 gt c4 For our choice of a 0 05 and f 2 we can calculate Az as a function of R by solving numerically the above equations using the exact Kolmogorov Smirnov cumulative probability distribution function In fig 5 1 we show the solution It is seen that it depends only weakly upon R it has a maximum value 0 134 at R 1 and is less than 3 times smaller at R 101 We can approximate Az as a function of R by the fo
150. ollowing abbrevations kev ev ryd j hz ang nm Syntax The following syntax rules apply use instrument il region 4412 r Use the range r in fitting the data The instrument il and the region i2 must be specified if either there are more than 1 instrument or more than 1 region used in the data sets use instrument il region 742 r unit a Same as the above but now the units a in which the range r of data points to be used is specified in any of the units mentioned above 44 Syntax overview Examples use 1000 1500 Re include the data channels 1000 1500 for fitting the data use instrument 1 region 1 1000 1500 Re include the data channels 1000 1500 of the first instru ment and the first region in the data set for fitting the data and plotting use instrument 1 region 1 1 1 5 unit kev Same as the above but now the unites are specified as keV instead of in data channels use 1000 1500 unit ev Re iclude the data points between 1000 and 1500 eV for fitting and plotting Note that in this case the input data should come from only one instrument and should contain no regions 2 31 Var various settings for the plasma models 2 31 1 Overview For the plasma models there are several quantities that have useful default values but can be adjusted manually for specific purposes We list them below Free bound emission Usually the freebound emission takes most of the computing time for the plasma models This
151. omical data analysis For that reason I propose here to save the response matrix in FITS format A widely used response matrix format is NASA s OGIP format This is used e g as the data format for XSPEC There are a few reasons that we propose not to adhere to the OGIP format here as listed below 1 The OGIP response file format as it is currently defined does not account for the possibility of response derivatives As was shown in the previous sections these derivatives are needed for the optimum binning Thus the OGIP format would need to be updated 2 In the later versions of OGIP new possibilities of defining the energy grid have been introduced that are prone to errors In particular the possibility of letting grids start at another index than 1 may and has led often to errors The sofware also becomes unncessarily complicated having to account for different possible starting indices Moreover the splitting into arf and rmf files makes it necessary to check if the indexing in both files is consistent and also if the indexing in the corresponding spectra is consistent 3 There are some redundant quantities in the OGIP format like the areascal keyword When the effective area should be scaled by a given factor this can be done explicitly in the matrix 4 As was shown in this work it is more efficient to do the grouping within the response matrix differently splitting the matrix into components where each component may have i
152. omponent the file name with the broadening kernal to myprofile dat Syntax The following syntax rules apply par i1 442 a1 avalue a2 Assign the value a2 to the parameters specified by the range of name s al of component range i2 of sectors il The sector range component range and parameter name range are optional If a2 should be an empty text string specify the value none without quotes and all four characters in lowercase If thei are not specified the sector s compo nent s and parameter s of the last call are used This command holds for input of text strings For real numbers use the following command with avalue replaced by value and a2 par il 452 a value r Assign the value r to the parameters specified by the range of name s a of component range i2 of sectors il The sector range component range and pa rameter name range are optional If not specified the sector s component s and parameter s of the last call are used par il 442 a status 41 As above but for the status of a range of parameters 1 T true thawn means a parameter that can be adjusted during a spectral fit 1 F false froze fixed means a parameter that will remain fixed during the spectral fitting 2 21 Par Input and output of model parameters 33 par il i2 a range r1 r2 As above but fore the allowed range of the parameter rl denotes the lower limi
153. onent is plotted separately e fwhm the peak energy of the response matrix as the model as well as the FWHM limits as the data are plotted The FWHM limits are the energies at which the response reaches half of its maximum value If for the y axis the option de e is chosen all calculated energies are divided by the energy of the incoming photon e chi the fit residuals either expressed in units such as counts s or the same units as the spectrum or expressed in terms of numer of standard deviations or as a relative error e dem a differential emission measure distribution 70 More about plotting Table 4 1 Available plot colours Value Colour 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 4 3 Plot colours Black background White default Red Green Blue Cyan Green Blue Magenta Red Blue Yellow Red Green Orange Red Yellow Green Yellow Green Cyan Blue Cyan Blue Magenta Red Magenta Dark Gray Light Gray Table 4 1 lists the plot colours that are available See also Fig 4 3 4 3 Plot colours 71 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Colour index Figure 4 1 Plot colours available with pgplot Note that on a hardcopy colour 1 is black and the background colour 0 is white while on most terminal screens colour 0 is balck and colour 1 is white 72 More about plotting 4 4 Plot line types When drawing lines the follo
154. op to bottom instrumental FWHM effective area A E and effective number of events N within one resolution element Right panel top frame optimum model energy bin size in units of the FWHM eqn 5 61 as the solid line with the contribution from the effective area eqn 5 60 as the upper dotted line the contribution from the model binning eqn 5 48 as the lower dotted line middle frame optimum model energy bin size in keV solid line and original bin size in the OGIP format matrix dotted line bottom frame number of original model energy bins to be taken together coinciding with the bin centroid for that approximation however the optimum bin size would be even a factor of 10 smaller On the other hand the ASCA model grid is over sampled at high energies Table 5 14 Rebinning of ASCA SISO data Parameter original final reduction OGIP value factor 96 Data channels 1024 192 18 8 Model bins 1168 669 57 2 Matrix elements 503668 69453 13 8 Table 5 14 summarizes the gain in bin size as obtained after optimum binning of the data and response matrix The reduction is again quite large It should be noted however that since at low energies the 5 8 examples 115 model energy grid binning of the original OGIP data is undersampled so that the final number of model bins in the optimum case of direct response generation in the new format might be somewhat larger On the other hand decomposing the matrix into its physical components re
155. ophysics Wiley New York Verner D A amp Yakovlev D G 1995 A amp AS 109 125 Verner D A Verner E M amp Ferland G J 1996 At Data Nucl Data Tables 64 1 Wheaton W A Dunklee A L Jacobson A S et al 1995 ApJ 438 322 Zycki P T Czerny B 1994 MNRAS 266 653 Zycki P T Done C Smith D A 1999 MNRAS 305 231 Index abundance 11 ASCA 7 ascdump 13 BeppoSAX 7 bin 15 calculate 15 clusters of galaxies 8 command files 28 comp 16 data 17 dem 18 distance 20 distance units 20 Doppler broadening 44 egrid 22 elim 23 error 24 file formats 107 fit 25 flux 20 free bound emission 44 ibal 26 ignore 27 ion 27 log 28 mekal 45 menu 29 multiply 30 obin 31 par 31 plot 34 plot axis scales 78 plot axis units 78 plot captions 76 plot colours 70 plot devices 69 plot line types 72 plot symbols 77 plot text 73 plot types 69 quit 38 Respons matrix 83 sector 38 shiftplot 39 show model 30 simulate 40 sky sector 20 step 41 supernova remnants 8 syserr 42 system 43 use 43 vbin 45 watch 46 XMM Newton 7
156. other disadvantage is that regions of the spectrum with good statistics are treated the same way as regions with poor statistics Regions with poor statistics contain less information than regions with good statistics hence can be sampled on a much coarser grid Finally a spectrum often extends over a much wider energy band than the spectral resolution of the detector In order to estimate e this would require that first the model spectrum convolved with the instrument response should be used in order to determine fo x However the true model spectrum is known in general only after spectral fitting The spectral fitting can be done only after a bin size A has been set It is much easier to characterize the errors in the line spread function of the instrument for a given bin size A since that can be done independently of the incoming photon spectrum If we restrict our attention now to a region r of the spectrum with a width of the order of a resolution element then in this region the observed spectrum is mainly determined by the convolution of the lsf in this resolution element r with the true model spectrum in a region with a width of the order of the size of the resolution element We ignore here any substantial tails in the Isf since they are of little importance in the determination of the optimum bin size resolution If all photons within the resolution element would be emitted at the same energy the observed spectrum would be simply the ls
157. ou to do a weighted fit according to the model or the data have the fit parameters and plot printed and updated during the fit and limit the number of iterations done Here we make a few remarks about proper data weighting x is usually calculated as the sum over all data bins i of N s 0 i e n 2 gay A 2 1 i 1 where N is the observed number of source plus background counts s the expected number of source plus background counts of the fitted model and for Poissonian statistics usually one takes o Nj Take care that the spectral bins contain sufficient counts either source or background recommended is e g to use at least 10 counts per bin If this is not the case first rebin the data set whenever you have a continuum spectrum For line spectra you cannot do this of course without loosing important information Note however that this method has inaccuracies if N is less than 100 Wheaton et al 1995 have shown that the classical Y method becomes inaccurate for spectra with less than 100 counts per bin This is not due to the approximation of the Poisson statistic by a normal distribution but due to using the observed number of counts N as weights in the calculation of x Wheaton et al showed that the problem can be resolved by using instead o s ie the expected number of counts from the best fit model The option fit weight model allows to use these modified weights By selecting it the expected nu
158. output will be appended at the end of this file log close output Close the current ascii file where screen output is stored No further output will be written to this file Examples log save myrun writes all subsequent commands to a new file named myrun com However in case the file already exists nothing is written but the user gets a warning instead log save myrun append as above but appends it to an existing file log save myrun overwrite as above but now overwrites without warning any already existing file with the same name log close save close the file where commands are stored log exe myrun executes the commands in file myrun com log output myrun writes all subsequent output to file myrun out log close output closes the file above 2 17 Menu Menu settings Overview When command lines are typed it frequently happens that often the first keywords are identical for several subsequent lines This may happen for example when a plot is edited SPEX offers a shortcut to this by using the menu command 30 Syntax overview Syntax The following syntax rules apply menu none Quit the current menu text settings i e return to the default spex prompt menu text a For all following commands the text string a will be appended automatically before the following commands Examples menu text plot All following commants will get the plot keyword put in front of them So if the next comma
159. pectral model This information can be viewed when the model parameters are shown see section 2 21 For each additive component of the model the following quantities are listed the observed photon number flux photons m s at earth including any effects of galactic absorption etc the observed energy flux W m at earth including any effects of galactic absorption etc the intrinsic number of photons emitted at the source not diluted by any absorption etc in photons s71 the intrinsic luminosity emitted at the source not diluted by any absorption etc in W The following units can be used to designate the energy or wavelength range keV the default eV Ryd J Hz A nm Syntax The following syntax rules apply elim rl r2 a Determine the flux between rl r2 in units given by a and as listed above The default at startup is 2 10 keV If no unit is given it is assumed that the limits are in keV WARNING When new units or limits are chosen the spectrum must be re evaluated e g by giving the calc comand in order to determine the new fluxes WARNING The lower limit must be positive and the upper limit must always be larger than the lower limit 24 Syntax overview Examples elim 0 5 4 5 give fluxes between 0 5 and 4 5 keV elim 500 4500 ev give fluxes between 500 and 4500 eV same result as above elim 5 38 a give fluxes in the 5 to 38 A wavelength band 2 11 Error Calculate the errors
160. perties that can be displayed and the user can either display these properties on the screen or write it to file The possible output types are listed below Depending on the specific spectral model not all types are allowed for each spectral component The keyword in front of each item is the one that should be used for the appropriate syntax plas basic plasma properties like temperature electron density etc abun elemental abundances and average charge per element icon ion concentrations both with respect to Hydrogen and the relevant elemental abundance rate total ionization recombination and charge transfer rates specified per ion rion ionization rates per atomic subshell specified according to the different contributing pro cesses pop the occupation numbers as well as upwards downwards loss and gain rates to all quantum levels included elex the collisional excitation and de excitation rates for each level due to collisions with electrons prex the collisional excitation and de excitation rates for each level due to collisions with protons rad the radiative transition rates from each level two the two photon emission transition rates from each level grid the energy and wavelength grid used in the last evaluation of the spectrum clin the continuum line and total spectrum for each energy bin for the last plasma layer of the model line the line energy and wavelength as well as the total line emission
161. pies the fraction of the total frame height given by r2 See also Sect 4 8 2 2 22 Plot Plotting data and models 35 plot z lin Plot the z axis on a linear scale The z axis is defined for two dimensional plots like contour plots plot z log As above but using a log scale plot ux ta Set the plot units on the x axis a can be A keV eV or whatever unit that is allowed The allowed values depend upon the plot type See Sect 4 8 1 for allowed units for each plot type plot uy fa Same as above but for the y axis plot uz fa Same as above but for the z axis plot rx r1 r2 set the plot range on the x axis from r1 to r2 plot ry r1 r2 Same as above but for the y axis plot rz r1 12 Same as above but for the z axis plot view default 1 For 1 is true the default viewport is used For 1 is false the default viewport is overruled and you can specify your own viewport limits with the set view x and set view y commands Useful for stacking different plot frames plot view x rl r2 Set the x viewport range from rl to r2 where rl and r2 must be in the range 0 1 plot view y rl r2 Same as above but for the y range plot view x1 r Set the lower x viewport limit to r plot view x2 r Set the upper x viewport limit to r plot view yl r Set the lower y viewport limit to r plot view y2 r Set the upper y viewport limit to r plot view back i Set the viewport background colour t
162. prepared with starting help by Gunsing by van der Wolf and Nieuwenhuijzen The second version was set up by Kaastra with contributions from Steenbrugge van der Heyden and Blustin 122 Acknowledgements Bibliography 1973 1989 1985 1992 2004 2002 2002 1994 2003 2005 2000 1992 Allen C W 1973 Astrophysical quantities 3rd Ed Athlone Press London Anders E amp Grevesse N 1989 Geochimica et Cosmochimica Acta 53 197 Arnaud M amp Rothenflug R 1985 A amp A Supp 60 425 Arnaud M amp Raymond J C 1992 ApJ 398 394 Bautista M A Mendoza C Kallman T R amp Palmeri P 2004 A amp A 418 1171 Behar E amp Netzer H 2002 ApJ 570 165 Behar E Sako M amp Kahn S M 2002 ApJ 563 497 Caldwell C D Schaphorst S J Krause M O amp Jim nez Mier J 1994 J Electron Spectrosc Relat Phenom 67 243 Draine B T 2003 ApJ 598 1026 Garcia J Mendoza C Bautista M A et al 2005 ApJS 158 68 Gorezyca T W 2000 Phys Rev A 61 024702 Grevesse N Noels A Sauval A J 1992 in Coronal Streamers Coronal Loops and Coronal and Solar Wind Composition Proc 1st SOHO Workshop ESA SP 348 ESA Publ Div ESTEC Noordwijk p 305 1998 2005 2004 1989 1993 2004 1994 1991 2003 1995 2004 1983 2001 2002 2003 Grevesse N amp Sauval A J 1998 ScScRev 85 161 Gu M F Schmidt M Beiersdorfer P et al 2005 ApJ
163. putational time may be very large however due to the convolution involved WARNING The outer radius cannot be larger than 400GM c The parameters of the model are rl Inner radius of the disk in units of GM c The minimum allowed value is 1 234 for a maximally rotating Kerr black hole For a Schwarzschild black hole one should take r 6 Default value 1 234 12 Outer radius of the disk in units of GM c Keep this radius less than 400 default value q Emissivity slope g as described above Default value 2 h Emissivity scale height Default value 0 i Inclination angle in degrees of the disk angle between line of sight and the rotation axis of the disk Default value 45 degrees 3 17 Lpro Spatial broadening model This multiplicative model broadens an arbitrary additive component with an arbitrarily shaped spatial profile in the case of dispersive spectrometers such as the RGS of XMM Newton In many instances the effects of a spatially extended source can be approximated by making use of the fact that for small off axis angles 0 the expression dA d0 is almost independent of wavelength A This holds for example for the RGS of XMM Newton for which dA d0 0 124 m A arcmin with m the spectral order We can utilize this for a grating spectrum as follows Make an image A0 of your source projected onto the dispersion axis as a function of the off axis angle A0 From the properties of your instrument this 60 Sp
164. r all values of A FWHM lt 1 3 However we recommend to use the conservative upper limits as given by 5 33 Another issue is the determination of N the number of events within the resolution element We have argued that an upper limit to N can be obtained by counting the number of events within one FWHM and multiplying it by the ratio of the total area under the Isf should be equal to 1 to the area under the Isf within one FWHM should be smaller than 1 For the Gaussian Isf this ratio equals 1 314 for other lsfs it is better to determine it numerically and not to use the Gaussian value 1 314 Finally in some cases the lsf may contain more than one component For example the grating spectra obtained with the EUVE SW MW and LW detector have first second third etc order contributions Other instruments have escape peaks or fluorescent contributions In general it is advisable to determine the bin size for each of these components individually and simply take the smallest bin size as the final one 5 4 Model binning 5 4 1 Model energy grid The spectrum of any X ray source is given by its photon spectrum f E f E is a function of the continuous variable E the photon energy and has e g units of photonsm s keV When we reconstruct how this source spectrum f E is observed by an instrument f E is convolved with the instrument response R c E in order to produce the observed count spectrum s c as follows s c R c E f
165. re necessary as SPEX needs the response matrix as well as the background to be subtracted for the simulations WARNING If your background is taken from the same observation as your source and you multiply the original exposure time with a factor of S you should put fy to S9 reflecting the fact that with increasing source statistics the background statistics also improves This is the case for an imaging observation where a part of the image is used to determine the background If instead you use a deep field to subtract the background then the exposure time of your background will probably not change and you can safely put fo 1 for any exposure time t WARNING If your subtracted background one of the columns in the spo file is derived from a low statis tics Poissonian variable for example a measured count rate with few counts per channel then scaling the background is slightly inaccurate as it takes the observed instead of expected number of background counts as the starting point for the simulation Syntax The following syntax rules apply simulate instrument il region i2 time rl 12 syserr 13 r4 noise 11 back 12 il and i2 specify the instrument and region range to be used in the simulation r1 is the exposure time t r2 the background error scale factor fj If omitted t will be taken as the exposure time of the current data set and fy 1 r2 must always be specified if t is specified In case of
166. rectory mydir data 2 7 DEM differential emission measure analysis 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 corre sponds to a multi temperature structure There are no restrictions to the number of multiplica tive 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 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 1 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 2 clean Clean method uses the clean method that is widely used in radio astronomy Useful for spiky emission measure distributions 2 7 DEM differential emission measure analysis 19 3 poly Polynomial method approximates the DEM by a polynomial in the log T log Y plane where Y is the emission measure Works well if the DEM is smooth 4 mult Multi temperature method tries to fit the DEM to the
167. rix like for example the main diagonal 112 Response matrices Table 5 11 First extension to the spectrum file description EXTNAME SPEC_REGIONS Contains the spectral regions in the form of a binary table NAXIS1I 4 There are 4 bytes in one row NAXIS2 This number corresponds to the total number of regions spectra contained in the file the number of rows in the table TFIELDS 1 The table has 1 column written as 4 byte integer TFORM 1J TTYPE1 NCHAN Number of data channels for this spectrum and the split events for a CCD detector If we were able to do that as the instrument specific software should be able to do we could reach an even larger compression of the response matrices I consider here data from three instruments with low medium and high resolution and work out the optimal binning The instruments are the Rosat PSPC ASCA SIS and XMM RGS detectors 5 8 2 Rosat PSPC For the Rosat PSPC data I used the spectrum of the cluster of galaxies A 2199 as extracted in the central 1 The spectrum was provided by J Mittaz and had a total count rate of 1 2 counts s with an exposure time of 8600 s The PSPC has a low spectral resolution as can be seen from fig 5 7 The number of resolution elements is only 6 7 After rebinning from the original 256 data channels only 15 remain This shows that for Rosat PSPC data analysis rebinning is absolutely necessary The optimum resolution of the model energy gri
168. rked out example for a CIE model where we took as free parameters the normalization norm temperature t Si abundance 14 and Fe abundance 26 To do a 3 dimensional grid search on the temperature logarithmic between 0 1 and 10 keV with 21 steps Fe abundace linear between 0 0 and 1 0 with 11 steps and Si abundance linear between 0 0 and 2 0 with 5 steps i e values 0 0 0 4 0 8 1 2 1 6 and 2 0 the following commands should be issued fit Do not forget to do first a fit step dimension 3 We will do a three dimensional grid search step axis 1 parameter 1 1 t range 0 1 10 0 n 21 The logarithmic grid for the first axis tem perature note the before the 21 42 Syntax overview step axis 2 par 26 range 0 1 n 11 The grid for axis 2 Fe abundance step axis 3 par 14 range 0 2 n 5 Idem for the 3rd axis Silicon step Now do the grid search Output is in the form of ascii data on your screen and or output file if you opened one 2 28 Syserr systematic errors Overview This command calculates a new error adding the systematic error of the source and the background to the Poissonian error in quadrature One must specify both the systematic error as a fraction of the source spectrum as well as of the subtracted background spectrum The total of these fractions can either be less or greater than 1 WARNING This command mixes two fundamentally different types of errors statistical random fluctu ations and syst
169. rom different regions of the detector but where these spectra need to be analysed simultaneously due to the overlap in point spread function from one region to the other This situation is e g encountered in the analysis of cluster data with ASCA or BeppoSAX 2 For the RGS of XMM the actual data space in the dispersion direction is actually two dimensional the position z where a photon lands on the detector and its energy or pulse height c as measured with the CCD detector X ray sources that are extended in the direction of the dispersion axis are characterised by spectra that are a function of both the energy E and off axis angle The sky photon distribution as a function of E is then mapped onto the z c plane By defining appropriate regions in both planes and evaluating the correct overlapping responses one may analyse extended sources 3 One may also fit simultaneously several time dependent spectra using the same response e g data obtained during a stellar flare It is relatively easy to model all these situations provided that the instrument is understood sufficiently of course as we show below Sky sectors First the relevant part of the sky is subdivided into sectors each sector corresponding to a particular region of the source for example a circular annulus centered around the core of a cluster or an arbitrarily shaped piece of a supernova remnant etc A sector may also be a point like region on the sky
170. ryd hz ang nm bin kev ev ryd mk cou kev ev ryd hz ang nm wkev wev wryd whz wang wnm jans lw ij bin Table 4 5 x axis units for plot type model data chi area fwhm and spec Bin number keV kilo electronvolt default value eV electronvolt Rydberg units Hertz A Angstrom nm nanometer Table 4 6 x axis units for plot type dem Bin number keV kilo electronvolt default value eV electronvolt Rydberg units K Kelvin MK Mega Kelvin Table 4 7 y axis units for plot type model spec Photon numbers Photons m s bin Photons m s keV default value Photons m s eV t Photons m s Ryd Photons m s Hz Photons m s7 T s 2 4 1 nm Photons m Energy units W m keV Wm eV 1 Wm Ryd W m Hz Wm A W m nmt Jansky 10776 W m Hz 1 vF units Wm Jansky Hz 107 W m Various Bin number 80 bin cou cs kev ev ryd hz ang nm fkev fev fryd fhz fang fnm Table 4 8 y axis units for plot type data Bin number Counts Countss Counts s keV default value Countss eV t Counts s Ryd Counts s Hz Counts Av Counts s 4 a l key 1 Counts m s Counts m s 1 eV t Counts m s Ryd Counts m s7 Hz Counts m s7 i 1 Counts m s7 nm Table 4 9 y axis units for plot type chi bin cou cs kev ev ryd hz ang nm fkev fev fryd fhz fang fnm dchi rel Bin n
171. s El and Ez for a simple often unphysical case T E 2e 70D 3 12 with the optical depth 7 E given by T E E 3 13 In addition we put here T 1 for E lt E and E gt Eg where FE and Ez are adjustable parameters This allows the user for example to mimick an edge Note however that in most circumstances there are more physical models present in SPEX that contain realistic transmissions of edges If you do not want or need edges simply keep Ej and Ez at their default values Note that To should be non negative For a gt 0 the spectrum has a high energy cut off for a lt 0 it has a low energy cut off and for a 0 the transmission is flat The larger the value of a the sharper the cut off is The model can be used a s a basis for more complicated continuum absorption models For example if the optical depth is given as a polynomial in the photon energy E say for example 7 2 3E AE one may define three etau components with To values of 2 3 and 4 and indices a of 0 1 and 2 This is because of the mathematical identity e 71 72 e77 x e772 The parameters of the model are tau Optical depth 7o at E 1 keV Default value 1 a The index a defined above Default value 1 el Lower energy E keV Default value 1072 e2 Upper energy E keV Default value 107 f The covering factor of the absorber Default value 1 full covering 3 11 Euve EUVE absorption model This model calc
172. s on additive components Additive components can be divided into two classes simple components like power law black body etc and plasma components that use our atomic code For the plasma components it is possible to plot or list specific properties while for the simple models this is not applicable 1 3 Different types of spectral components 9 Multiplicative components can be divided into 3 classes First there are the absorption type components like interstellar absorption These components simply are an energy dependent multiplication of the original source spectrum SPEX has both simple absorption components as well as absorption components based upon our plasma code The second class consists of shifts redshift either due to Doppler shifts or due to cosmology is the prototype of this The third class consists of convolution type operators An example is Gaussian velocity broadening For more information about the currently defined spectral components in SPEX see chapter 3 10 Introduction Chapter 2 Syntax overview 2 1 Abundance standard abundances Overview For the plasm models a default set of abundances is used All abundances are calculated rela tive to those standard values The current default abundance set is Anders amp Grevesse 1989 However it is recommended to use the more recent compilation by Lodders 2003 In partic ular we recommend to use the proto solar solar system abundances for mos
173. s performed For each of the resolution elements we determine the maximum value for Az from 5 26 5 28 and using 5 34 we find for a given number of photons N in the resolution element the maximum allowed value for 6 in the same resolution element 98 Response matrices The approximation fo to the true distribution f as given by eqn 5 39 fails most seriously in the case that the true spectrum within the bin is also a 6 function but located at the bin boundary at a distance AE 2 from the assumed line center at the bin center Using the Gaussian lsf it is easy to show that the maximum error dy for fo to be used in the Kolmogorov Smirnov test is given by E 21 27 This approximation holds in the limit of AE lt c Inserting eqn 5 40 we find that the bin size should be smaller than do 5 41 oO Awa lt 2 1289 A R N 95 5 42 Figure 5 6 Maximum model energy grid bin width AE in terms of the FWHM as a function of the number of photons N in the bin using different approximations fo solid line f dashed line and f dotted line as discussed in the text The calculation is done for R 1 upper curves or R 1000 lower curves resolution elements Exact numerical results are shown in fig 5 6 The approximation 5 41 is a lower limit to the exact results so can be safely used A somewhat better approximation but still a lower limit appears to be the following AE FWHM As expected on
174. splay the lower top caption of frame 2 plot ux a Set the x axis plot units of frame 2 to A plot ry 1 1 Set the y axis plot range of frame 2 to between a lower limit of 1 and an upper limit of 1 plot frame 1 Go to frame 1 plot view default f Set the default viewport keyword to false so that new user viewport values can be specified for frame 1 plot view yi 0 25 Set the lower y viewport limit of frame 1 to 0 25 of the full device window plot de cps filename ps Open a colour postscript graphics device and write the output file to file name ps plot Redraw the plot on all frames and devices plot close 2 Close device number 2 which is the postscript device in this case 2 23 Quit finish the program The quit option exits the execution of SPEX closes the open plot devices and scratch files if any and if requested outputs the cpu time statistics Syntax The following syntax rule applies quit quit the program as described above 2 24 Sector creating copying and deleting of a sector Overview This allows one to create delete copy and show the number of sectors used for the analysis of the data A sector is a region on the sky with its own spectral model or a part of the lightcurve of a variable source with its time dependent spectrum etc See for more details about sectors and regions section 1 2 For doing spectral fitting of data sets the sectors need to be specified in the response matrix of the data th
175. start with a spectral model and a spectral data set both matrix and spectrum After giving the simulate command the observed spectrum will be replaced by the simulated spectrum in SPEX Note that the original spectrum file with the spo extension is not overwritten by this command so no fear to destroy your input data Different options exist and several parameters can be set e Instrument region the instrument s and region s for which the simulation should be done i e if you have more instruments you can do the simulation only for one or a few instruments e time set the exposure time t s of the source spectrum as well as the background error scale factor fo This last option allows you to see what happens if for example the background would have a ten times higher accuracy for f 0 1 e syserr add a systematic error to both the source and background spectrum An alternative way to introduce systematic errors is of course to use the syserr command Sect 2 28 Take care not to set the systematic errors twice and remember that rebinning your spectrum later will reduce the systematic errors as these will be added in quadrature to the statistical errors So first rebin and then add systematics e noise either randomize your data or just calculate the expected values e back do the background subtraction or keep it in the data WARNING A response matrix and spectrum of the region and the instrument you want to simulate a
176. sum of Gaussian components as a function of log T Good for discrete and slightly broadened components but may not always converge 5 gene Genetic algorithm using a genetic algorithm try to find the best solution Advan tage 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 1 Read and prepare the spectral data that should be analysed 2 Define the dem model with the comp dem command 3 Define any multiplicative models absorption redshifts etc that should be applied to the additive model 4 Define the parameters of the dem model number of temperature bins temperature range abundances etc 5 give the dem lib command to create a library of isothermal spectra 6 do the dem method of choice each one of the five methods outlined above 7 For different abundances or parameters of any of the spectral components first the dem lib command must be re issued Syntax The following syntax rules apply dem lib Create the basic DEM library of isothermal spectra dem reg auto Do DEM analysis using the regularization method using an automatic search of the optimum regularization parameter It determines the regularisation parameter R in such a way that x2 R x 0 1 sy2 n nr where the scaling factor s 1 n is the number o
177. t fl Transmission T A1 at Ai w2 Wavelength Az A of the second grid point fl Transmission T A2 at A w9 Wavelength Ag of the last grid point f9 Transmission T Ag at Ag Note that if n lt 9 the values of T and A will be ignored for i gt n 3 16 Laor Relativistic line broadening model This multiplicative model broadens an arbitrary additive component with a relativistic line profile The relativistic line profile is interpolated from tables produced by Laor 1991 In his model the line transfer function is determined for emission from the equatorial plane around a Kerr black hole assuming an emissivity law cos0 1 2 06cos The transfer function is calculated at a grid of 35 radii rn 1600 n 1 for n 1 35 in units of GM c 31 inclinations uniformly spaced in cosi and 300 frequencies logarithmically spaced between 0 1 and 5 times the emission frequency respectively Using these numbers a radial integration is done using an emissivity law I r 1 r 52972 3 16 where h is a characteristic scale height and q an asymptotic power law index for large r I r r79 The integration is done between an inner radius ri and an outer radius ro Given the radial grid that is provided in Laor s data the outer radius extends out to at most 400GM c WARNING Of course any line or continuum emission component can be convolved with the this broad ening model for continuum components the com
178. t and r2 denotes the upper limit Both should be specified par il i2 a1 couple i3 i4 a2 Here i1 i2 al are the sector s component s and parameter s that are to be coupled The parameter s to which they are coupled are specified by a2 and the optional i3 i4 If ranges are used take care that the number of sectors components and parameters on the right and left match par i1 i2 al couple i3 i4 a2 factor r As above but couple using a scaling factor Hr par i1 i2 a decouple Decouples the parameter s a of optional components i2 of of optional sector s il Inverse operation of the couple command par show free Shows on the display screen all parameters of all components If the optional keyword free is given shows only parameters with fit status T true thawn i e the free parameters in a spectral fit par write a overwrite Writes all parameters to a SPEX command file a fa should be specified without extension SPEX automatically adds the com extension If the optional overwrite command is given then the file a will be overwritten with the new values Examples par val 10 Sets the value of the current parameter to 10 par t val 4 Sets the parameter named t to 4 par 06 28 value 0 3 Sets the parameters named 06 28 for example the abundances of C Z 6 N Z 7 Ni Z 28 to the value 0 3 par 2 nh val 0 01 Se
179. t applications as the solar photospheric abundance has been affected by nucleosynthesis burning of H to He and settlement in the Sun during its lifetime The following abundances Table 2 1 can be used in SPEX Table 2 1 Standard abundance sets reset default Anders amp Grevesse ag Anders amp Grevesse 1989 allen Allen 1973 ra Ross amp Aller 1976 grevesse Grevesse et al 1992 gs Grevesse amp Sauval 1998 lodders Lodders proto solar 2003 solar Lodders solar photospheric 2003 For the case of Grevesse amp Sauval 1998 we adopted their meteoritic values in general more accurate than the photospheric values but in most cases consistent except for He slightly enhanced in the solar photosphere due to element migration at the bottom of the convection zone C N and O largely escaped from meteorites Ne and Ar noble gases In Table 2 2 we show the values of the standard abundances They are expressed in logarithmic units with hydrogen by definition 12 0 For Allen 1973 the value for boron is just an upper limit WARNING For Allen 1973 the value for boron is just an upper limit Syntax The following syntax rules apply 12 Syntax overview Table 2 2 Abundances for the standard sets AG Allen RA Grevesse GS Lodders solar 12 00 12 00 12 00 12 00 10 97 10 99 10 98 10 90 116 3 31 3 35 3 28 1 15 1 42 1 48 1 41 2 6 2 79 2 85 2 78 8 55 8 52 8 46 8 39 7 97 7 92 7 90 7 83 8 87 8 83
180. tart for example with the same value for each y the fitting algorithm will start to vary each parameter in turn if it changes for example parameter x by 1 this means a factor of 10 since the neighbouring points like 2 1 and zj44 however are not adjusted in thid step the photon spectrum has to be drawn as a cubic spline through this very sharp function and it will show the well known over and undershooting at the intermediate x values between z and x and between zj and x 1 as the data do not show this strong oscillation X will be poor and the fitting algorithm will decide to adjust the parameter y only with a tiny amount the big improvement in x would only come if all values of y were adjusted simultaneously The parameters of the model are type The parameter type defined above allowed values are 1 4 Default value 1 n The number of grid points n Should be at least 2 low Lower x value b4 upp Upper x value b2 Take care to take ba gt bj x001 First x value by definition equal to b z values are not allowed to vary ie you may not fit them x002 Second x value x003 Third x value Other x values x999 last x value by definition equal to bn If n lt 999 replace the 999 by the relevant value for example if n 237 then the last x value is x237 y001 First y value This is a fittable parameter y002 Second y value y003 Third y value Other y values y999 last y value
181. th the increased spectral resolution and sensitivity of the grating spectrometers of AXAF and XMM this becomes cumbersome For example with a spectral resolution of 0 04 over the 5 38 band the RGS detector of XMM will have a bandwidth of 825 resolution elements which for a Gaussian response function translates into 1940 5 4 Model binning 97 times o Several of the strongest sources to be observed by this instrument will have more than 10000 counts in the strongest spectral lines example Capella and this makes it necessary to have a model energy grid bin size of about c 4 10000 The total number of model bins is then 194000 Most of the computing time in thermal plasma models stems from the evaluation of the continuum The reason is that e g the recombination continuum has to be evaluated for all energies for all relevant ions and for all relevant electronic subshells of each ion On the other hand the line power needs to be evaluated only once for each line regardless of the number of energy bins Therefore the computing time is approximately proportional to the number of bins Going from ASCA SIS resolution 1180 bins to RGS resolution 194000 bins therefore implies more than a factor of 160 increase in computer time And then it can be anticipated that due to the higher spectral resolution of the RGS more complex spectral models are needed in order to explain the observed spectra than are needed for ASCA with more free parameters
182. the DEM to a temperature width of 0 3 in log T approximately a factor of 2 in temperature range 2 8 Distance set the source distance Overview One of the main principles of SPEX is that spectral models are in principle calculated at the location of the X ray source Once the spectrum has been evaluated the flux received at Earth can be calculated In order to do that the distance of the source must be set SPEX allows for the simultaneous analysis of multiple sky sectors In each sector a different spectral model might be set up including a different distance For example a foreground object that coincides partially with the primary X ray source has a different distance value The user can specify the distance in number of different units Allowed distance units are shown in the table below 2 8 Distance set the source distance 21 Table 2 3 SPEX distance units internal SPEX units of 10 m this is the default meter Astronomical Unit 1 49597892 10 m lightyear 9 46073047 10 m parsec 3 085678 1016 m kpc kiloparsec 3 085678 10 m Mpc Megaparsec 3 085678 107 m redshift units for the given cosmological parameters recession velocity in km s for the given cosmological parameters The default unit of 10 m is internally used in all calculations in SPEX The reason is that with this scaling all calculations ranging from solar flares to clusters of galaxies can be done with single precision arithmetic without c
183. the atomic number indicated by il and ionisation stage indicated by i2 in the line spectrum Examples ions ignore all Do not take any line calculation into account ions use iso 3 Use ions from the Z 3 Li isoelectronic sequence ions use iso 1 2 Use ions from the H like and He like isoelectronic sequences ions ignore z 26 Ignore all iron Z 26 ions ions use 6 5 6 Use C V to C VI ions show Display the list of ions that are used 2 16 Log Making and using command files Overview In many circumstances a user of SPEX wants to repeat his analysis for a different set of parameters For example after having analysed the spectrum of source A a similar spectral model and analysis could be tried on source B In order to facilitate such analysis SPEX offers the opportunity to save the commands that were used in a session to an ascii file T his ascii file in turn can then be read by SPEX to execute the same list of commands again or the file may be edited by hand The command files can be nested Thus at any line of the command file the user can invoke the execution of another command file which is executed completely before execution with the current command file is resumed Using nested command files may help to keep complex analyses manageable and allow the user easy modification of the commands For example the user may have a command file named run which does his entire analysis This command file might start with the lin
184. the binning A is sufficient if the sampling errors are sufficiently small as compared to the noise errors What is sufficient will be elaborated further 86 Response matrices Table 5 1 Weights Wmn 1 2 Si r m n m used in the cumulative Shannon approximation S l 3 9 8 7 6 5 4 3 2 1 For the comparison of the aliased model to the true model we consider two statistical tests the classical x test and the Kolmogorov Smirnov test This is elaborated in the next sections 5 3 4 The x test Suppose that fo x is the unknown true probability density function pdf describing the observed spectrum Further let fi r be an approximation to fo using e g the Shannon reconstruction as discussed in the previous sections with a bin size A The probability po of observing an event in the data bin number n under the hypothesis Ho that the pdf is fo is given by nA Pon J fo x da 5 6 n 1 A and similar the probability p n of observing an event in the data bin number n under the hypothesis H that the pdf is f is nA ins fla de 5 7 n 1 A We define the relative difference 6 between both probabilities as Din pon 1 n 5 8 Let the total number of events in the spectrum be given by N Then the random variable Xn defined as the number of observed events in bin n has a Poisson distribution with an expected value un N poa The classical x test for testing the hypothesis Hp against H is now
185. the data in SPEX on a lin lin frame before you execute the plot adum command Also note that the data will be written in the units that were specified in the plot energy wavelength or whatever is applicable If the optional append keyword is present the data will be appended to any existing file with the name a if the optional overwrite keyword is present any pre existing file with the name a will be overwritten by the new data Examples plot device xs Open the graphic device xs xserver plot device ps myplot ps Select a postscript device connected to the file name myplot ps 38 Syntax overview plot type data Plot the data on the selected graphics device s plot ux angstrom Set the x axis plot units to plot uy angstrom Set the y axis plot units to Counts s plot frame new Open a new frame in the selected graphics device s plot frame 2 Go to the 2nd frame all plot commands will now only affect frame 2 plot type chi Plot the residuals in frame 2 plot uy rel Set the y axis plot units in frame 2 to Obsereve Model Model plot view default f Set the default viewport keyword to false so that new user viewport values can be specified for frame 2 plot view y2 0 2 Set the upper y viewport limit of frame 2 to 0 2 of the full device window plot cap id disp f Do not display the id caption of frame 2 plot cap ut disp f Do not display the upper top caption of frame 2 plot cap 1t disp f Do not di
186. this is not a free parameter it is calculated each time the model is evaluated 3 7 Delt delta line model The delta line model is a simple model for an infinitely narrow emission line The spectrum is given by F E AS E Ep 3 11 where E is the photon energy in keV F the photon flux in units of 10 phs keV Ep is the line energy of the spectral line in keV and A is the line normalisation in units of 10 phs The total line flux is simply given by A To ease the use for dispersive spectrometers gratings there is an option to define the wavelength instead of the energy as the basic parameter The parameter type determines which case applies type 0 default corresponding to energy type 1 corresponding to wavelength units 3 8 Dem Differential Emission Measure model 55 WARNING When changing from energy to wavelength units take care about the frozen thawn status of the line centroid and FWHM WARNING You need to do a calc or fit command to get an update of the wavelength for type 0 or energy type 1 The parameters of the model are norm Normalisation A in units of 1044 phs Default value 1 e The line energy Ep in keV Default value 6 4 keV type The type 0 for energy units 1 for wavelength units w The line wavelength A in A Default value 20 A 3 8 Dem Differential Emission Measure model This model calculates a set of isothermal CIE spectra that can be used later in one of the D
187. tified in the approximation that all photons of the model bin would have the energy of the bin centroid This is not always the case however and in the previous subsection we have given arguments that it is better not only to take into account the flux F but also the average energy E of the photons within the model bin This average energy E is in general not equal to the bin centroid Ej and hence we need to evaluate the effective area not at Ej but at Eq In general the effective area is energy dependent and it is not trivial that the constant approximation over the width of a model bin is justified In several cases this will not be the case We consider here the most natural first order extension namely the assumption that the effective area within a model bin is a linear function of the energy For each model bin j we write the effective area A E in general as follows A E Ao Ai E E Es ej E 5 54 The above approximation is good when the residuals e E are sufficiently small We use a Taylor expansion in order to estimate the residuals E 5 A Ej E EY 5 55 where as usual A denotes the second derivative of A with respect to the energy It is immediately seen from the above expressions that the maximum error occurs when F is at one of the bin boundaries As a consequence we can estimate the maximum error max as Emax AE A E 5 56 By using the approximation 5 54 with e neglected we therefore mak
188. ting data the data can be labeled with different symbols as indicated in Fig 4 7 PGPLOT Marker Symbols 0 1 2 a 4 O 5 6 7 B8 9 x A 10 11 12 13 14 H o A d 18 16 17 18 19 XX 20 21 22 23 24 o o o O 25 26 27 28 29 olo 30 31 1 2 3 T y A 4 5 6 7 8 a 9 e e Figure 4 5 Plot symbols that are available 78 More about plotting 4 8 Plot axis units and scales 4 8 1 Plot axis units Different units can be chosen for the quantities that are plotted Which units are available depends upon the plot type that is used for example an observed spectrum data a Differential Emission Measure distribution DEM etc For the availabe plot types see Sect 4 2 Note also that depending upon the plot type there are two or three axes available the x axis y axis and z axis The last axis is only used for contour maps or images and corresponds to the quantity that is being plotted in the contours or image The units that are allowed for the x axis are listed in Tables 4 5 4 6 and for the y axis in Tables 4 7 4 12 WARNING For the plot type data option there are options starting with f that are essentially countsm In these cases the observed count rates counts s keV for instance are divided by the nominal effective area at the relevant energy This nominal effective area is determined for a flat input spectrum
189. ts own energy grid This is not possible within the present OGIP format 5 7 1 Proposed response format I propose to give all response files the extension res in order not to confuse with the rmf or arf files used within the OGIP format The file consists of the mandatory primary array that will remain empty plus a number of extensions In principle we could define an extension for each response component However this may result into 108 Response matrices practical problems For example the fitsio package allows a maximum of 1000 extensions The docu mentation of fitsio says that this number can be increased but that the access time to later extensions in the file may become very long In principle we want to allow for data sets with an unlimited number of response components For example when a cluster spectrum is analysed in 4 quadrants and 10 radial annuli one might want to extract the spectrum in 40 detector regions and model the spectrum in 40 sky sectors resulting in principle in at least 1600 response components this may be more if the response for each sky sector and detector region has more components Therefore I propose to use only three additional and mandatory extensions The first extension is a binary table with 4 columns and contains for each component the number of data channels model energy bins sky sector number and detector region number see table 5 8 The second extension is a binary table
190. ts the parameter named nh of component 2 to the value 0 01 par 1 1 norm value 1E8 Sets parameter named norm of component 1 of sector 1 to the value 105 par file avalue myfile with data sets the ascii type parameter named file to the value my file with data without quotes par file avalue none sets the ascii type parameter named file to the value i e an empty string par status frozen Sets the fit status of the current parameter to frozen fixed par 1 3 t stat thawn Specifies that parameter t of the third component of the model for sector 1 should be left free thawn during spectral fitting par 2 3 gamm range 1 6 1 9 Limit parameter gamm of component 3 of sector 2 to the range 1 6 1 9 par norm range 1E8 1E8 Set the range for the parameter norm between 10 and 108 This command is necessary if for example the model is a delta line used to mimick an absorption line which normally has a default minimum value of 0 for an emission line par 1 1 norm couple 2 1 norm Couples the norm of the first component for the first sector to the norm of the first component of the model for the second sector par 1 1 norm couple 2 1 norm factor 3 The same command as the above but now the norm of the first component in the model for sector 1 is 3 times the norm of the first component of the model for sector 2 For example if the norm of the 1st component of sector 2 gets the value 40 then the norm of the 1st
191. two different cases case 1 flag 0 the redshift component can be used to calculate the effects of the cosmological redshift The cosmological redshift has the effect of the energy shift and the time dilatation as outlined above Therefore the above procedure is essentially correct and this is what was used in older versions of SPEX before version 2 00 10 However what was overlooked there is that in the determination of the finally observed spectrum flux as seen on Earth a division by 47d is necessary For this distance d we took the luminosity distance However the factors 1 z are absorbed into the definition of the luminosity distance Therefore in the older versions all fluxes were too small by a factor of 1 z Since we want to retain the luminosity distance as the natural distance measure for spectra it appears necessary to multiply the spectrum as calculated by the original subroutine by a factor of 1 z But in the other case redshifts caused by the motion of a source at any distance this re correction should not be done reason why we introduce the other option in summary for redshift components corresponding to cosmological redshifts the option flag 0 default must be used case 2 flag 1 this is the old case for a source with a redshift caused by motion away from us It should be used for any velocity fields other than the Hubble flow The parameters of the model are z Redshift z Default value 0 flag Fl
192. ue 1 km s dlam Offset parameter Ao in Default value 0 file Ascii character string containing the actual name of the vprof dat file 3 18 Mbb Modified blackbody model This model describes the spectrum of a blackbody mdified by coherent Compton scattering This is in several instances a much better description than a simple blackbody for example accretion disk spectra 3 19 Neij Non Equilibrium Ionisation Jump model 61 of AGN The physical background is described for example by Rybicki amp Lightman 1979 pages 218 219 The formulae that we use here with a derivation are given by Kaastra amp Barr 1989 From that work we derive the spectrum 10 photons s keV AE 25 3 21 where E is the photon energy in keV T the temperature in keV and A the normalisation in units of 107 m 5 defined by A n 5O 3 22 with ne the electron density units 102 m and O the emitting source area units 1016 m The parameters of the model are norm Normalisation A in units of 10 Default value 1 t The temperature T in keV Default value 1 keV m 5 3 19 Neij Non Equilibrium Ionisation Jump model This model calculates the spectrum of a plasma in non equilibrium ionisation NEI For more details about NEI calculations see Sect The present model calculates the spectrum of a collisional ionisation equilibrium CIE plasma with uniform electron density ne and temperature T1 that is instantan
193. ulates the transmission of gas with cosmic abundances as published first by Rumph et al 1994 It is a widely used model for the transimission at wavelenghts covered by the EUVE satellite A gt 70 A As it these wavelengths metals are relatively unimportant it only takes into account hydrogen and helium but for these elements it takes into account resonances However it is not recommended to use the model for harder X rays due to the neglect of metals such as oxygen etc Otherwise the user is advised to use the absm model or the hot model with low temperature in SPEX which gives the transmission of a slab in collisional ionisation equilibrium The parameters of the model are nh Hydrogen column density in 1075 m Default value 1074 corresponding to 10 m a typical value at low Galactic latitudes 3 12 File model read from a file 57 hel The Her H1 ratio Default value 0 1 he2 The Herr Hr ratio Default value 0 01 f The covering factor of the absorber Default value 1 full covering 3 12 File model read from a file This model reads a spectrum from a file The user inputs a spectrum at n energy bins n gt 1 The file containing the spectrum should have the follwing format e first line n e second line Ey S1 e third line E2 Sa e e last line En Sn Here E is the energy of a photon in keV and S is the spectrum in units of 10 photonss keV All energies E must be positive and th
194. um e g data with bad quality or parts of the spectrum that he is not interested in For these reasons it is also usefull to have the proposed rebinning scheme available in the spectral file I propose to add to each data channel three logical flags either true or false first if the data channel is the first channel of a group fi next if the data channel is the last channel of a group 1 and finally if the data channel is to be used u i A channel may be both first and last of a rebinning group fi and l both true in the case of no rebinning The first data channel i 1 always must have f true and the last data channel l true Whenever there are data channels that are not used u false the programmer should check that the first data channel after this bin that is used gets f true and the last data channel before this bin taht is used gets true The spectral analysis package needs also to check for these conditions upon reading a data set and to return an error condition whenever this is violated Finally I propose to add the nominal energies of the data bin boundaries cj and ci to the data file This is very usefull if for example the observed spectrum is plotted outside the spectral fitting program In the OGIP format this information is contained in the response matrix I know that sometimes objections are made against the use of these data bin boundaries expressed as energies Of course formally speaking the observed data
195. umber Counts Counts s Countss keV default value Countss eV Countss Ryd7 Counts s Hz Counts s 1 Counts s nm Counts m A keV Counts m s7 ey Counts m s Ryd Counts m s Hz Counts m s7t 1 Countsm s nm Observed Model Error default Observed Model Model bin m2 cm2 Table 4 10 y axis units for plot type area Bin number default cm More about plotting 4 8 Plot axis units and scales 81 Observed spectrum None SPEX Version 2 00 Mon 7 Jul 2003 10 37 08 N i 2 i T T T T Counts m s R 0 5 LP a gt OU 0 2 i i i i i 12 14 16 18 20 22 Wavelength A Figure 4 6 Example of the mixed y axis scale Simulation of a Chandra LETGS spectrum for a thermal plasma with a temperature of 1 keV Table 4 11 y axis units for plot type fwhm bin Bin number kev keV kilo electronvolt default value ev eV electronvolt ryd Rydberg units hz Hertz ang Angstrom nm nm nanometer de e AE E Table 4 12 y axis units for plot type dem the emission measure Y is defined as Y neng V and is expressed in units of 10 m Here n is the electron density ne is the Hydrogen density and V the emitting volume bin Bin number em Y default demk dY dT per keV demd dY dT per K 82 More about plotting Chapter 5 Response matrices 5 1 Respons matrices
196. useful for n 1 Default value 0 which implies no printing of intermediate steps fit iter i Stop the fitting process after i iterations regardless convergence or not This is useful to get a first impression for very cpu intensive models To return to the default stop criterion type fit iter 0 fit weight model Use the current spectral model as a basis for the statistical weight in all subsequent spectral fitting fit weight data Use the errors in the spectral data file as a basis for the statistical weight in all subse quent spectral fitting This is the default at the start of SPEX fit method classical Use the classical Levenberg Marquardt minimisation of x as the fitting method This is the default at start up fit method estat Use the C statistics instead of x for the minimisation Examples fit Performs a spectral fit At the end the list of best fit parameters is printed and if there is a plot this will be updated fit print 1 If followed by the above fit command the intermediate fit results are printed to the screen and the plot of spectrum model or residuals is updated provided a plot is selected fit iter 10 Stop the after 10 iterations or earlier if convergence is reached before ten iterations are completed fit iter 0 Stop fitting only after full convergence default fit weight model Instead of using the data for the statistical weights in the fit use the current model fit weight data Use t
197. veloping software for a particular instrument in order to construct the relevant response matrix 5 6 1 Creating the data bins Given an observed spectrum obtained by some instrument the following steps should be performed in order to generate an optimally binned spectrum 1 Determine for each original data channel i the nominal energy Ejo defined as the energy for which the response at channel reaches its maximum value In most cases this will be the nominal channel energy 2 Determine for each data channel i the limiting points 41 22 for the FWHM in such a way that Rp jo 0 5 Rijo for all i1 lt k lt i2 while the range of 11 12 is as broad as possible 3 By linear interpolation determine for each data channel the points fractional channel numbers cl and c2 near il and i2 where the response is actually half its maximum value By virtue of the previous step the absolute difference cl i1 and c2 i2 never can exceed 1 4 Determine for each data channel i the FWHM in number of channels c by calculating c2 cl Assure that c is at least 1 106 11 5 6 2 Response matrices Determine for each original data channel i the FWHM in energy units e g in keV Call this W This and the previous steps may of course also be performed directly using instrument calibration data Determine the number of resolution elements R by the following approximation Hey LT 5 70 ER Determine the parameter A R
198. wing line types are possible The first is the default value Further the user can specify the thickness of the lines Default value is 1 larger values give thicker lines Maximum value is 200 Recommended value for papers use line weight 3 For an example of different line weights see also Fig 4 4 PGPLOT Line Widths Line Width Figure 4 2 Example of different line weights 4 5 Plot text 73 4 5 Plot text In SPEX it is possible to draw text strings on the plot surface or near the frame of the plot Several properties of the text can be adjusted like the fontheight font type colour orientation and location of the text See Fig 4 5 1 for an example of possible fonts 4 5 1 Font types font The following fonts types are allowed values between 1 4 1 normal font default 2 roman font 3 italic font 4 script font PGPLOT Fonts gt ormal ABCDQ efgh 1234 afy AOAQ Roman ABCDQ efgh 1234 afy AGAN talc ABCDQ efgh 1234 afy AGAN Script 48629 do 1234 aBy AGAN flx AE 1 1 A 75 25 kms Mpc L L 5 6 A1216R Markers 3 8B 12 28 lt Figure 4 3 Example of different fonts 74 More about plotting Table 4 2 A list of available escape sequences Seq description u start a superscript or end a subscript A u must be ended by a d d start a subscript or end a superscript A Nd must be ended by a Nu NN backspace i e do not adva
199. with 5 columns and contains for each model energy bin for each component the lower model energy bin boundary keV the upper model energy bin boundary keV the starting data channel end data channel and total number of data channels for the response group see table 5 9 The third extension is a binary table with 2 columns and contains for each data channel for each model energy bin for each component the value of the response at the bin center and its derivative with respect to energy see table 5 10 SI units are mandatory i e m for the response m keV for the response derivative Table 5 8 First extension to the response file EXTNAME RESP_INDEX Contains the basic indices for the components in the form of a binary table NAXISI 16 There are 16 bytes in one row NAXIS2 This number corresponds to the total number of components the number of rows in the table NSECTOR NREGION NCOMP TFIELDS 4 TTYPE1 NCHAN TTYPE2 TTYPE3 SECTOR TTYPE4 REGION This 4 byte integer is the number of sky sectors used This 4 byte integer is the number of detector regions used This 4 byte integer is the totalnumber of response compo nents used should be equal to NAXIS2 The table has 4 columns all columns are written as 4 byte integers TFORM 1J First column contains the number of data channels for each component Not necessarily the same for all components but it must agree with
200. written by Kaastra Nieuwenhuijzen contributed to the software design The line and continuum emission routines were written by Kaastra based on previous routines by Mewe Gronenschild van den Oord and Lemen 1981 1986 The line and continuum emission data are based on the work by Mewe and Kaastra The photo ionization cross sections have been provided by Verner Liedahl contributed to the Fe L calculations Nieuwenhui jzen Raassen and Hansen contributed to the extension of the atomic database Behar and Raassen contributed to the atomic data for the absorption models Mazzotta worked on the ionization balance The non equilibrium ionization balance routine was developed by Jansen based on earlier work by Hans Schrijver 1974 and Gronenschild 1981 The SNR models are based on the work by Kaastra and Jansen 1992 with further extensions and testing by Stil Eggenkamp and Vink Lemen Smeets and Alkemade developed an earlier version 1986 1990 of a spectrum synthesis program The philosophy of the fitting procedure is based on the experiences obtained with the fitting of EXOSAT data especially on the software package ERRFIT designed by Jansen and Kaastra The original DEM modelling was based on the work by Sylwester and Fludra 1980 while the current DEM regularisation algorithm has been designed by Karel Schrijver and Alkemade Bartelds contributed to the testing of these models The first version 1 0 of the documentation has been
201. x it oscillates with an amplitude decreasing proportional to 1 x towards the constant 7 2 From 5 5 it can be easily seen that in the limit of A 0 with t mA fixed this expression reduces to 5 4 For illustration we list in table 5 1 some values of the weights used in the summation The expression 5 5 for F equals F if f t is band limited We see in that case that at the grid points F is completely determined by the value of f at the grid points By inverting this relation one could express f at the grid points as a unique linear combination of the F values at the grid Since Shannon s theorem states that f t for arbitrary t is determined completely by the f values at the grid we infer that f t can be completely reconstructed from the discrete set of F values And then by integrating this reconstructed f t also F t is determined We conclude that also F t is completely determined by the set of discrete values F mA at t mA for integer values of m provided that f t is band limited In cases of non bandlimited responses we will use 5 5 to approximate the true cumulative distribution function at the energy grid In doing this a small error is made These errors are known as aliasing errors The errors can be calculated easily by comparing Fs mA by the true F mA values Then for an actually observed spectrum containing counting noise these sampling errors can be compared to the counting noise errors We will conclude that
202. x overview status range and coupling This is illustrated by the following example Assume we have a spectral model consisting of a thermal plasma Consider the silicon abundance acronym in the model 14 It can have a value for example 2 0 meaning twice the solar abundance Its status is a logical variable true thawn if the parameter can be adjusted during the spectral fitting proces or false frozen if it should be kept fixed during the spectral fit The range is the allowed range that the parameter can have during the spectral fit for example 0 1000 minimum maximum values This is useful to set to constrain a spectral search to a priori reasonable values e g abundances should be non negative or safe values SPEX could crash for negative temperatures for example Finally the coupling allows you to couple parameters for example if the Si abundance is coupled to the Fe abundance a change in the Fe abundance either defined by the user or in a spectral fitting process will result automatically in an adjustment of the Si abundance This is a useful property in practical cases where for example a spectrum has strong Fe lines and weaker lines from other species but definitely non solar abundances In this case one may fit the Fe abundance but the statistics for the other elements may not be sufficient to determine their abundance accurately however a priori insight might lead you to think that it is the global metallicity that is e
203. y averaging the data and matrices data save i a overwrite Save data a from instrument i with the option to overwrite the existent file SPEX automatically tags the spo extension to the given file name No response file is saved data show Shows the data input given as well as the count rates for source and background the energy range for which there is data the response groups and data channels Also the inte gration time and the standard plotting options are given Examples data mosresp mosspec read a spectral response file named mosresp res and the corresponding spectral file mosspec spo Hint although 2 different names are used here for ease of understand ing it is eased if the spectrum and response file have the same name with the appropriate extension data delete instrument 1 delete the first instrument data merge aver 3 5 merge instruments 3 5 into a single new instrument 3 replacing the old instrument 3 by averaging the spectra Spectra 3 5 could be spectra taken with the same instrument at different epochs data merge sum 1 2 add spectra of instruments 1 2 into a single new instrument 1 replacing the old instrument 1 by adding the spectra Useful for example in combining XMM Newton MOS1 and MOS2 spectra data save 1 mydata Saves the data from instrument 1 in the working directory under the filename of mydata spo data mydir data mosresp mydir data mosspec read the spectrum and response from the di
204. ype can be displayed or the same plot type but with different units Take care to position the viewport of the new and old frames to the desired locations plot frame i Sets frame number i to be the currently active frame After this command has been issued all plot commands will only affect the currently active frame plot frame delete i Deletes frame number 1 plot type a Specifies what is to be plotted in the selected frame a can be any of the plot types specified in Sect 4 2 plot device fal a2 Selects a graphics device fal and optional file name a2 in the case of a postscript or gif device File extensions for example ps should be specified For valid devices see Sect 4 1 plot close i Close graphics device number i Note always close a postscript device before quiting spex otherwise the contents may be corrupted plot hlan Make a hardcopy in landscape orientation and send it to the standard printer Use is made of the unix command lp c filename plot hpor As above but for portrait orientation plot x lin Plot the x axis on a linear scale plot x log Plot the x axis on a log scale plot y lin Plot the y axis on a linear scale plot y log Plot the y axis on a log scale plot y mix rl 412 Plot the y axis on a mixed linear logarithmic scale for y values below r1 the data will be plotted linear and for y values above r1 the data will be plotted logarithmically the linear part occu
Download Pdf Manuals
Related Search
Related Contents
Performance Series 460e 取扱説明書 詳細取扱説明書 - NTT東日本 Web116.jp Desfibrilador Defibtech Externo Semi-Automático Série DDU LG M4213CCBA Avis du Comité régional Phyto. Manual de Usuario - GlobalMap México World receiver Инструкция Bosch GSS 140 A Copyright © All rights reserved.
Failed to retrieve file