next up previous
Next: Additional Notes Up: Quick-start Tutorial Previous: Fit to a GIS2

Fit to a ROSAT PSPC Observation of NGC 4594

This example demonstrates the use of the built-in PSF generation feature for the ROSAT PSPC. After entering XIMGFIT,
ximgfit> data tutorial/rp600258n00_pi40-200_b8_center.img.gz
ximgfit> psf rosat_pspc 0. tutorial/n4594_pspc_pl_model.dat 0.4 2.0
ximgfit> stat C
ximgfit> model Constant Gaussian Gaussian Gaussian Gaussian 
ximgfit> setpar 1 0.02 0.01 0 10
ximgfit> setpar 2 -3.9 1. -9. 1.
ximgfit> setpar 3 50.4 1. 40. 60.
ximgfit> setpar 4 0.2 0.01 0.0 100
ximgfit> setpar 5 105.5 1. 0.001 500
ximgfit> setpar 6 72. 1. 0.001 500
ximgfit> setpar 7 -19.8
ximgfit> setpar 8 -90. 0.1 -95. -85.
ximgfit> setpar 9 -94. 0.1 -100.
ximgfit> setpar 10 1200 100. 0 10000 
ximgfit> setpar 11 1 0.1 0.001 100
ximgfit> setpar 14 189.1 0.1 184 194 
ximgfit> setpar 15 -47.9 0.1 -53 -43 
ximgfit> setpar 16 1000 100 0 10000
ximgfit> setpar 17 0.5 0.01 0.001 100 
ximgfit> setpar 20 -25.4 0.1 -30 -20 
ximgfit> setpar 21 40.1 0.1 35 45
ximgfit> setpar 22 115.6 2 0 1000 
ximgfit> setpar 23 25. 0.1 0.001 100 
ximgfit> setpar 24 0.6 0.01 0.001 100 
ximgfit> setpar 25 -3.
ximgfit> freeze 13
ximgfit> freeze 19
ximgfit> new 12 = 11
ximgfit> new 18 = 17
These commands are contained in the file n4594_pspc_0.5-2.0kev_setup.ximg. After fitting for 100 iterations (fit 100 0.01), the fit parameters should have converged at:
 Par Mod   Name            Value (     units)        Description
  1   1  const           0.0222 (counts/pix)        Constant intensity
  2   2     xc            -4.56 (    arcsec)        X offset from image center
  3   2     yc             50.8 (    arcsec)        Y offset from image center
  4   2   norm            0.158 (      comp)        Normalization
  5   2 sigmax              106 (    arcsec)        Sigma in the X direction
  6   2 sigmay             72.5 (    arcsec)        Sigma in the Y direction
  7   2  theta            -19.8 (   degrees)        Rotation angle
  8   3     xc            -90.2 (    arcsec)        X offset from image center
  9   3     yc            -94.4 (    arcsec)        Y offset from image center
 10   3   norm         1.66e+03 (      comp)        Normalization
 11   3 sigmax             1.09 (    arcsec)        Sigma in the X direction
 12   3 sigmay             1.09 (    arcsec)   = 11 Sigma in the Y direction
 13   3  theta                0 (   degrees) frozen Rotation angle
 14   4     xc              189 (    arcsec)        X offset from image center
 15   4     yc              -48 (    arcsec)        Y offset from image center
 16   4   norm         1.07e+03 (      comp)        Normalization
 17   4 sigmax            0.507 (    arcsec)        Sigma in the X direction
 18   4 sigmay            0.507 (    arcsec)   = 17 Sigma in the Y direction
 19   4  theta                0 (   degrees) frozen Rotation angle
 20   5     xc            -25.2 (    arcsec)        X offset from image center
 21   5     yc             40.1 (    arcsec)        Y offset from image center
 22   5   norm              107 (      comp)        Normalization
 23   5 sigmax             27.1 (    arcsec)        Sigma in the X direction
 24   5 sigmay            0.603 (    arcsec)        Sigma in the Y direction
 25   5  theta            -3.02 (   degrees)        Rotation angle
C = 7259.50, with 20715 degrees of freedom (20736 data bins)
And finally save the current fit using save all n4594_pspc_0.5-2.0kev_fit.ximg. The data, model (including PSF), PSF, and residual images are shown in Figure 3.

Figure: Result of ``view data'' (top left), ``view psf'' (bottom left), ``view model'' (top right), and ``view resid'' (bottom right) within XIMGFIT. All images are displayed logarithmically.
\begin{figure}\epsfig{file=n4594_pspc_all.ps,height=288pt}\end{figure}

As an example of getting the errors, which will also serve to improve a fit, use autoximg in the background: autoximg n4594_pspc_0.5-2.0kev_fit 4.605 &. The progress of the error search/refitting can then be monitored using tail -f logs/n4594_pspc_0.5-2.0kev_fit_err.log. However, only attempt this if you have a very fast computer with lots of CPU time to spare (around several days for a 500 Mhz Pentium III, in this case) since the error space is very bumpy and the fits tend to get caught in relative minima. Try the genetic algorithm instead (see below).

Since the typical user will most likely be interested in positions and count rates, the commands pos and counts are available. In the case of this NGC 4594 fit, the output of these commands are:

ximgfit> pos  
(xc, yc) not defined for model 1
Model 2:  (xc, yc) = (71.86, 84.70)
        (ra, dec) = (189.991723, -11.619843)
                  = 12 39 58.0 -11 37 11.44
Model 3:  (xc, yc) = (50.44, 48.39)
        (ra, dec) = (190.016019, -11.660186)
                  = 12 40 3.8 -11 39 36.67
Model 4:  (xc, yc) = (120.27, 60.01)
        (ra, dec) = (189.936800, -11.647279)
                  = 12 39 44.8 -11 38 50.20
Model 5:  (xc, yc) = (66.70, 82.03)
        (ra, dec) = (189.997570, -11.622816)
                  = 12 39 59.4 -11 37 22.14
ximgfit> counts
Total model = 2086.86 counts  (0.2 cts/s)
Model 1: total = 460.89 counts (22.09% of total) , 0.044 cts/s
Model 2: total = 473.12 counts (22.67% of total) , 0.045 cts/s
Model 3: total = 288.02 counts (13.80% of total) , 0.027 cts/s
Model 4: total = 108.37 counts (5.19% of total) , 0.01 cts/s
Model 5: total = 756.47 counts (36.25% of total) , 0.072 cts/s
Total of data = 2091.00 counts , 0.2 cts/s


next up previous
Next: Additional Notes Up: Quick-start Tutorial Previous: Fit to a GIS2
Andrew Ptak 2001-10-11