Fit a table model to a spectrum in XSPEC

In this example we apply the table model (grid18) calculated in the previous example to the Chandra HETG spectrum of NGC 37843. We use the canned spectrum of observation ID 2090 from TGCat and run XSPEC from the command line

 XSPEC12>data meg_1.pha.gz
 XSPEC12>notice 0.9-1.5
 XSPEC12>model mtable{grid18/xout_mtable.fits}*powerlaw
 Input parameter value, delta, min, bot, top, and max values for ...
        1e+21      9e+19(     1e+19)      1e+19      1e+19      1e+23      1e+23
 1:XSTAR_fine_g:column>2.24e+22
            0        0.5(       0.5)         -4         -4          4          4
 2:XSTAR_fine_g:rlogxi>2.36
            0     -0.001(     0.001)          0          0          5          5
 3:XSTAR_fine_g:z>0.00973
            1       0.01(      0.01)         -3         -2          9         10
 4:powerlaw:PhoIndex>0.10739
            1       0.01(      0.01)          0          0      1e+20      1e+24
 5:powerlaw:norm>0.0043101

 ========================================================================
 Model mtable{/Users/rballhau/work/xstar/xstardoc.git/figures/grid18/xout_mtable.fits}<1>*powerlaw<2> Source No.: 1   Active/On
 Model Model Component  Parameter  Unit     Value
 par  comp
   1    1   XSTAR_fine_gcolumn              2.24000E+22  +/-  0.0
   2    1   XSTAR_fine_grlogxi              2.36000      +/-  0.0
   3    1   XSTAR_fine_gz                   9.73000E-03  frozen
   4    2   powerlaw   PhoIndex            0.107390     +/-  0.0
   5    2   powerlaw   norm                4.31010E-03  +/-  0.0
 ________________________________________________________________________


Fit statistic  : Chi-Squared                27528.93     using 8192 bins.

Test statistic : Chi-Squared                27528.93     using 8192 bins.
Null hypothesis probability of 0.00e+00 with 8188 degrees of freedom
Current data and model not fit yet.

***Warning: Magnitudes of parameters in model for data group 1
     have been found to differ by more than 1e+10.
     This can lead to significant roundoff errors during fit calculation.

XSPEC12>cpd /xw
XSPEC12>setplot energy
XSPEC12>setplot rebin 4 4
XSPEC12>setplot command r y 0 0.5
XSPEC12>setplot xlog off
XSPEC12>setplot command color 8 on 2
XSPEC12>plot
../_images/x2x-ngc3783.png