Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/6.0.0/doc/evigweight.ps.gz
Дата изменения: Thu Mar 18 23:20:02 2004
Дата индексирования: Tue Oct 2 07:59:35 2012
Кодировка:

Поисковые слова: x-ray background
XMM-Newton Science Analysis System Page: 1
evigweight
March 18, 2004
Abstract
Weight EPIC events with inverse e ective area over one exposure
1 Instruments/Modes
Instrument Mode
EPIC MOS IMAGING
EPIC PN IMAGING
2 Use
pipeline processing no
interactive analysis yes
3 Description
3.1 Introduction
evigweight applies to inhomogeneous extended sources. The source spectrum (shape and ux) depends
on the region considered (ie on the sky coordinates). The instrument (telescope+detector) response is
not at, ie the e ective area at a given energy depends on the position in the focal plane, de ned by
detx; dety the detector coordinates (DETX,DETY columns).
evigweight sets the stage for an alternative method to building an exposure map (via eexpmap) adapted
to the spectral selection or an e ective area (via arfgen) adapted to the spatial selection, in parallel to
images and spectra. The idea is to `correct' each photon so that the derived event list is equivalent to
what one would get for a at instrument.
Because the weight is computed for each event on the basis of its own detector coordinates, the method
is not sensitive to pointing variations of the telescope. Because the event's own energy is used, it makes
no assumption about the spatial or spectral repartition of the source.
xmmsas 20040318 1831-6.0.0

XMM-Newton Science Analysis System Page: 2
3.2 De nitions
The spectroscopic model of the source gives s ;ф (E), the number of photons received per cm 2 and per
second at the earth, from sky position ; ф and at energy E (di erential per solid angle and energy).
The number of photons, m detx;dety (I), detected (per second) in pixel detx; dety and in PI energy bin I
centered at E I is obtained by multiplying by the e ective area and applying the response matrix:
m detx;dety (I) =
Z
e
R detx;dety (e; I) A detx;dety (e) s ;ф (e)
de
(1)
A detx;dety (E) is the e ective area at position detx; dety for energy E and includes all instrumental e ects
(telescope, RGA, lter, detector). R detx;dety (E; I) is the redistribution of photons of energy E at position
detx; dety into PI bin I . The correspondence between sky position and detector coordinates depends on
the telescope's pointing. In theory this correspondence is not direct, but via a convolution with the Point
Spread Function. This complication is ignored here (see Sect.3.7).
3.3 Event processing
evigweight computes a weight for each photon j falling at detector coordinates (detx j ; dety j ) and of
energy (PI) E j by the inverse of the ratio of the e ective area at that position to the central e ective
area (at the same energy):
w j = A 0;0 (E j )
A detx j ;dety j
(E j ) (2)
This weight is stored by default as column WEIGHT (the name can be changed setting weightcolname).
3.4 Spectral analysis
One can then de ne (via evselect called with withzcolumn=Y withzerrorcolumn=N) a `corrected'
spectrum O 0 (I) within region Reg (usually in sky coordinates) and its associated error (O 0 (I)):
O 0 (I) =
X
j
w j
T exp (CCD j ) ( j ; ф j ) 2 Reg; E I E I =2 < E j < E I +E I =2 (3)
 2 (O 0 (I)) =
X
j
w 2
j
T 2
exp (CCD j ) (4)
where T exp (CCD j ) is the exposure time for the CCD/node where the event was detected and E I the
width of bin I . If the region Reg extends over a single CCD, the exposure time may be taken out of the
sums. O 0 (I) is an estimate of the spectrum one would get if the detector was at.
In terms of the usual `uncorrected' spectrum:
O 0 (I) = hw j i(I) O(I) (5)
 2 (O 0 (I)) = hw 2
j i(I) O(I) (6)
where the hi denote the average over the O(I) photons in bin I .
The corresponding source spectrum S(E) is also obtained by summing over the region, and the model
spectrum M 0 (I) (to be compared to the data) by multiplying with the central e ective area and applying
xmmsas 20040318 1831-6.0.0

XMM-Newton Science Analysis System Page: 3
the response matrix.
S(E) =
X
;ф2Reg
s ;ф (E) (7)
M 0 (I) =
Z
e
R Reg (e; I) A 0;0 (e) S(e) de (8)
Of course the response matrix should be taken (via rmfgen) in the true detector region (not at the
center) associated with the sky region Reg. The central e ective area may be obtained by calling arfgen
with special settings:
arfgen arfset=your_arf spectrumset=your_spectrum withbadpixcorr=N modelee=N \
withdetbounds=Y filterdss=N detmaptype=flat detxbins=1 detybins=1 \
withsourcepos=Y sourcecoords=tel sourcex=0 sourcey=0
Model tting may be performed via XSPEC, entering O 0 (I) as RATE, and (O 0 (I)) as STAT ERR, with
A 0;0 (e) and R Reg (e; I) in the Ancillary Response File and Redistribution Matrix File, respectively.
Note that the weighting procedure is incompatible with using the Poisson model (C-statistic) in XSPEC
(the  2 formula must be used). This means that care must be taken to have enough counts per spectral
bin.
3.5 Spatial analysis
In the same way, constructing an image D 0 ( ; ф) of the source within the energy band E 1 ; E 2 may be
done by calling evselect (with withzcolumn=Y withzerrorcolumn=N) :
D 0 ( ; ф) =
X
E1 w j = T exp (9)
(D 0 ( ; ф)) =
s X
j
w 2
j = T exp (10)
This is directly proportional to the source brightness (no need to divide by the exposure map), except
for bad pixels and CCD gaps (see Sect.3.9).
3.6 Pros and cons
Advantages: exact, easy to use (only one ARF), can deal with any complex spatial variation of the source.
Drawbacks: degradation of the statistical quality:
O 0 (I)=O 0 (I) =
q
hw 2
j i=hw j i O(I)=O(I) (11)
from Eq.5 and 6. This is not a problem if the e ective area is not varying much in the region considered
(
q
hw 2
j i=hw j i  1).
3.7 Assumptions
 The method outlined above is valid, if the vignetting e ect is constant within one PSF (this
is OK for XMM) and remains the same for energies di ering by the order of E (this is OK
for XMM except at the very lowest energies).
xmmsas 20040318 1831-6.0.0

XMM-Newton Science Analysis System Page: 4
 The current version ignores the PATTERN value. This results in vignetting being computed
for PATTERN=0. This is all right since the pattern distribution is approximately the same
for all CCDs.
3.8 Background correction
One important issue for the spectral analysis with X-ray detectors is the treatment of background for
extended sources. In order to subtract the background properly, one needs the background spectrum
with precisely the same detector characteristics as the extracted source spectrum. The backcorr task
should not be used on spectra obtained with the weighting procedure (because it corrects for di erential
vignetting between the source and background areas).
To deal with the particle background (more or less constant outside proton ares), one should assign
weights to the reference event list and extract images or spectra using the same spectral or spatial (in
detector coordinates) selection as the source. The original spatial selection (on the source) is usually
applied to sky coordinates (not detector coordinates). As XMM's pointing is very stable, the conversion
from a region in sky coordinates (X,Y) to one in detector coordinates (DETX,DETY) is just a rotation-
translation. A scale factor obtained by comparing event rates outside the eld of view or at very high
energy should generally be applied to the reference images or spectra. The di erence should then be
particle free. This operation subtracts some astrophysical background as well, but not necessarily the
right one for the current eld.
In addition to the particle background, the residual astrophysical component (positive or negative) may
be subtracted if it can be assumed to be uniform over the eld of view (can be checked on the image),
and the source does not cover the entire eld of view. Selecting an area outside the source for Reg, one
may use Sect.3.4 to build the `on-axis' background spectrum, which can be directly subtracted from the
source spectrum (accounting for the di erent region sizes via backscale). Integrating that spectrum
within a band (and dividing by the region's area) results in a constant which may be subtracted from
images.
3.9 Correction for gaps and dead pixels
evigweight does not o er an automatic way to deal with gaps, dead/hot pixels and columns in the
detector.
An easy and simple approach is to assume that the source in the extracted region emits homogeneously.
In this case one can directly compute the BACKSCAL keyword and add it to the spectral le via backscale.
For images one may get the corresponding exposure map via eexpmap, switching o all the vignetting
corrections (mirror, lter, quantum eфciency) in eexpmap except the gaps and bad pixels. This is done
by calling eexpmap with withvignetting=N and withpatterns=N.
4 Parameters
This section documents the parameters recognized by this task (if any).
Parameter Mand Type Default Constraints
ineventset yes dataset ' ' none
name of input events le
xmmsas 20040318 1831-6.0.0

XMM-Newton Science Analysis System Page: 5
newoutput no boolean no yes/no
Create output events le (no for overwriting input)
outeventset no dataset 'events.out' none
name of output events le. If this parameter is set, then newoutput=Y is automatic
weightcolname no string 'WEIGHT' none
name of output (weight) column
withe ectivearea no boolean yes yes/no
factor the mirror's e ective area (and gratings absorption for MOS) into vignetting weight
with ltertransmission no boolean yes yes/no
factor the lter's transmission into vignetting weight
withquantumeфciency no boolean yes yes/no
factor the CCD's quantum eфciency into vignetting weight
5 Errors
This section documents warnings and errors generated by this task (if any). Note that warnings and
errors can also be generated in the SAS infrastructure libraries, in which case they would not be docu-
mented here. Refer to the index of all errors and warnings available in the HTML version of the SAS
documentation.
copyData01 (error)
PI is neither Integer16 (as in merged events lists) nor Real32 (as in CCD-speci c events
lists)
6 Input Files
1. Either an events le (from emenergy or epevents) with EVENTS extension containing PI,
DETX, DETY, RAWX, RAWY
2. Or an events le (from evlistcomb) with EVENTS extension containing CCDNR, PI, DETX,
DETY, RAWX, RAWY
7 Output Files
1. events le with additional items:
 new column, name taken from weightcolname (for evselect)
 keywords detailing which subroutines were activated
 keywords propagated to the EXPOSURE extension (for evlistcomb)
xmmsas\_20040318\_1831-6.0.0

XMM-Newton Science Analysis System Page: 6
8 Algorithm
MODULE em_events_module
Read the parameters
Open events file
If newoutput then clone events file
Read columns PI, DETX, DETY, RAWX, RAWY, CCDNR (if it exists)
Create column WEIGHT (or enable modifications if it already exists)
Set CAL state to central CCD
call CAL_telCoordToCamCoord2(0,0,xmm2,ymm2,zmm2)
call CAL_camCoord2ToCamCoord1(xmm2,ymm2,zmm2,xmm1,ymm1,zmm1)
call CAL_camCoord1ToChipCoord(xmm1,ymm1,zmm1,RAWX0,RAWY0)
Loop over PI
eff0 = effarea(PI,0,0,RAWX0,RAWY0)
end loop
Set CAL state to current CCD
call CAL_getMiscellaneousData('FOCAL_LENGTH',focalLength)
step = 1. / realAttribute(detx_col,'TCDLT')
conv = step * 180.d0 / pi / focalLength
Loop over events
if CCDNR exists and CCDNR changed then set CAL state to new CCD
if not (OUT_OF_FOV or OUT_OF_CCD_WINDOW or OUTSIDE_THRESHOLDS) then
call CAL_camCoord2ToTelCoord(DETX/conv,DETY/conv,0,theta,phi)
WEIGHT = eff0(PI) / effarea(PI,theta,phi,RAWX,RAWY)
endif
end loop
Close events file
FUNCTION effarea(PI,DETX,DETY,RAWX,RAWY)
effarea = 1.
E0 = min(max(PI,100),14000)
if witheffectivearea then
effarea = effarea * CAL_getEffectiveArea(E0, theta, phi)
if withfiltertransmission then
effarea = effarea * CAL_getFilterTransmission(E0, theta, phi)
if withquantumefficiency then
effarea = effarea * CAL_getQuantumEfficiency(E0, RAWX, RAWY)
end module
9 Comments
 The principle of evigweight ignores the Point Spread Function. It should never be used
for analysing point sources.
 Events outside the eld of view ( agged as OUT OF FOV), outside the CCD ( agged as
xmmsas 20040318 1831-6.0.0

XMM-Newton Science Analysis System Page: 7
OUT OF CCD WINDOW), or outside the energy range ( agged as OUTSIDE THRESHOLDS), get
WEIGHT=0. As a result they are automatically ignored when creating images or spectra.
References
xmmsas 20040318 1831-6.0.0