1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
#+TITLE: Surface Brightness Profile (SBP) Extraction
#+AUTHOR: Weitian LI <liweitianux@live.com>
#+DATE: 2016-06-05
* TODO SBP extraction procedures
TODO
* How =dmextract= calculate the area of extraction region
The =dmextract= can take either *events* file or binned *image* file as the input file. However, the extracted SBP may be *different*, mainly due to the area calculation.
Above all, let's have a look at how the SBP quantities are calculated ([[dmextract]]):
#+BEGIN_EXAMPLE
MEAN_SRC_EXP = TOTAL_SRC_EXP / EXP_AREA
SUR_BRI = COUNTS / AREA ~ AREA^{-1}
FLUX = COUNTS / EXPOSURE / MEAN_SRC_EXP ~ EXP_AREA
SUR_FLUX = FLUX / AREA ~ EXP_AREA / AREA
#+END_EXAMPLE
where =AREA= is the area of the source extraction region, while the =EXP_AREA= is the area of the exposure map with respect to the source extraction region.
Note we explicit distinguish these two areas, as we'll see below that it is responsible for the different extraction results.
Also note that we ignored the background contribution here for simplicity.
For both the two cases, the *excluded point sources* (i.e., =[exclude sky=region(???.reg)]=) are taken into account, and they are also *excluded* when calculating the extraction region (i.e., the =AREA= column/values of the produced HISTOGRAM file by =dmextract=).
Therefore, no extra procedure is required in order to subtract the areas of these excluded point sources from the surface brightness extraction region.
The excluded regions corresponding to the point sources are recorded in the FITS header using the keyword =DSVAL?=, so =dmextract= can properly handle this.
** Image file as the input
Using the already binned *image* file as the input file is *recommended*, and it is simper than the events file case, e.g.,
#+BEGIN_SRC sh
$ dmextract infile="img_c7_e700-7000.fits[bin sky=@sbprofile.reg]" \
outfile="sbprofile.fits" \
exp="expmap_c7_e700-7000.fits" \
opt=generic
#+END_SRC
Generally, the image file is as such generated:
#+BEGIN_SRC sh
$ dmcopy infile="evt2_c7_clean.fits[energy=700:7000]\
[sky=region(skyfov.fits[ccd_id=7])]\
[bin sky=1]" \
outfile="img_c7_e700-7000.fits"
#+END_SRC
where we use the *ACIS-S* (=ccd_id=7=) observation as an example, and the =skyfov.fits= contains the FoV/region of each CCD chip.
Also note that the =skyfov.fits= should be generated by the CIAO tool =skyfov= with the parameter =aspect= specified, otherwise, the produced =skyfov.fits= dose not precisely describe the CCD chip regions, due to the ignorant of aspect solution.
As the =skyfov.fits= is incorporated to generate the image, the regions that describe the CCD geometries are also recorded into the FITS header using the same set of keywords =DSVAL?=, similar to the case of excluded point sources.
Therefore, when =dmextract= calculate the area of the source extraction region, the regions that *beyond the CCD edges* are excluded as well. So the =AREA= is exact the *valid* area of the extraction region with both the point source regions and out-of-CCD regions excluded.
The exposure map is generated by the CIAO tool =fluximage= and has the identical dimensions as that of the input image. So the =EXP_AREA= is the same as =AREA=.
Thus the final =SUR_FLUX= is independent of the area of the extraction region, which is what we want.
As a result, it is recommended to bin the events file into an image, and then extract SBP from the image.
** Event file as the input
When using the cleaned events file as the input file to extract SBP, e.g.,
#+BEGIN_SRC sh
$ dmextract infile="evt2_c7_clean.fits[energy=700:7000][bin sky=@sbprofile.reg]" \
outfile="sbprofile.fits" \
exp="expmap_c7_e700-7000.fits" \
opt=generic
#+END_SRC
extra care should be taken to deal with the regions that beyond the CCD edges.
Since the events file does not incorporate the CCD FoV information (=skyfov.fits=), =dmextract= has no idea about the CCD FoV and thus can just calculate the total area of the source extraction region (excluded the regions corresponding to the removed point sources), i.e., the =AREA= is the total area of the extraction region with point source areas subtracted.
On the other hand, the exposure map is always an image with the CCD FoV information embedded, and has certain boundaries.
When =dmextract= to calculate the =MEAN_SRC_EXP=, the =EXP_AREA= is the *intersection* between the above *source extraction region* and *exposure image*.
If the *source extraction region* is beyond the *exposure image boundaries* (a un-rotated box that just enclose the CCD FoV), the =EXP_AREA= is then *smaller than* =AREA=.
In consequence, the final calculated =SUR_FLUX= (with dimension of =EXP_AREA/AREA=) has dependency on the extraction regions and maybe underestimated.
Therefore, using the events file as the input file for SBP extraction is *not* recommended, and if it is used, the original extraction regions should be additionally processed to account for the regions that beyond the CCD FoV, i.e., *intersect* then with the CCD FoV which is extracted from =skyfov.fits=.
* References
+ <<dmextract>> CIAO =dmextract= help: http://cxc.cfa.harvard.edu/ciao/ahelp/dmextract.html
|