Next: 7.15 Adjust BACKSCAL Stage
Up: 7 Using ACIS Extract
Previous: 7.13 EXTRACT_BACKGROUNDS Stage
Subsections
7.14 Better Backgrounds
When your sources are crowded, the whole concept of creating background spectra from a ``background event list'' that contains little or no light from the point sources (as discussed in §7.12, 7.13) is no longer appropriate.
A crowded source has multiple background components.
First, it has the usual flat component, i.e. instrumental and sky background that has a relatively flat spatial distribution.
Any background region that is nearby should, after appropriate scaling, model this component.
However the crowded source will, by definition, also have significant background components that arise from the PSF wings of neighboring sources.
We desire a background spectrum that models all these background components.
The tool ae_better_backgrounds seeks to construct a single background region plus a background scaling that simultaneously models all the background components.
The background region is constructed iteratively.
At each iteration a number of possible expansions of the region are judged and the best one is adopted.
Judging the quality of a proposed background region consists of evaluating how well it is expected to model each of the background components corrupting our source.
For the flat component, one preference we should have is that the region be reasonably compact, i.e. local to the source.
In this tool we define a compactness metric which we seek to minimize.
We can also judge a background region with respect to each background component that arises from the PSF wing of a neighboring source by considering its expected bias, i.e. the difference between the power we expect to find from that neighbor in our extraction and background regions (after scaling).
An ideal background region would have zero bias for each neighbor, i.e. it would sample just enough power from each neighbor to account for the contamination from that neighbor.
In this tool we compute these biases by integrating spatial models of each neighbor over the two regions.
These models are simply PSF images, scaled using rough photometry provided by a previous AE extraction.
The goal of zero expected bias for each neighbor is useful because neighbors may have very different spectra.
However, perhaps the most important goal is to have zero overall bias in the background subtraction, which one might refer to as avoiding ``photometric bias''.
We attempt to achieve this by careful selection of the scaling that is applied to the background region (see Appendix C).
The compactness metric and background component biases are combined to form a scalar metric which drives the iterative construction of a background region.
The stopping criteria controlling the growth of the background region are:
- The region's background scaling MUST end up in the range [BKSCL_LO,BKSCL_HI] (obtained from source.stats). (For coding convenience, a value just above BKSCL_HI is acceptible.)
- If the region's background exposure ratio reaches the target value of BKSCL_GL (obtained from source.stats) and the region contains at least MIN_NUM_CTS in-band counts then the search is stopped.
- After the BKSCL_LO criterion is met, we compute a background imbalance metric that judges how fairly all the background components are represented in the background region; the region's growth is stopped if the background imbalance metric exceeds BACKGROUND_IMBALANCE_THRESHOLD.
The best way to review the background regions constructed by the better backgrounds algorithm is the SHOW stage of AE, where the background region (which is a set of pixels, not any sort of geometric region that ds9 can understand) is depicted by blue plus signs.
Also, the BETTER_BACKGROUNDS code prints a little table for each source showing how many counts from each neighbor are expected in the source aperture and in the scaled background region.
For some sources, the background region turns out to be very small, containing very few (even zero) counts.
A typical source suffering this problem has a weak neighbor very nearby.
The algorithm attempts to build a region that is expected to sample an appropriate amount of power from this neighbor, but quickly ``runs out of signal'' when the region has completely covered the neighbor.
Adding further area to the region would simply dilute the power from this neighbor, taking the background spectrum even further from being a fair sample of all the background components.
Essentially, the algorithm is faced with the impossible task of satisfying two competing goals:
- Build a region that, after scaling, is a good model of the contamination in our aperture arising from that close neighbor's wings.
- Build a large region that has plenty of counts to get a precise estimate of the flat component of the background (i.e. instrumental background and the smooth X-ray sky).
The right way to deal with crowding is to simultaneously fit spatio-spectral models to groups of sources that interact, along with some kind of flat background spectrum thought to be free of point source power, calculating during the fitting process how much power from each source spills over into the other source apertures.
Sherpa can probably do this, but that's way beyond my abilities.
The ae_better_backgrounds tool is generally no longer explicity called by the observer; instead, the tool ae_standard_extraction now has an option /BETTER_BACKGROUNDS which directs it to call ae_better_backgrounds instead of performing the masked background computation.
An example is shown in own recipe for using AE
(§7.1).
This tool requires the standardized directory structure and file naming convention used in §3 and in the example recipe.
This tool must estimate source photometry; thus prior to running this tool you must extract source spectra.
As described above, this tool computes backgrounds that are tailored to the source extraction regions; thus if you modify extraction regions you should rerun ae_better_backgrounds.
ae_better_backgrounds, obsname, EVTFILE_BASENAME=
name, BACKGROUND_MODEL_FILENAME=
filepath, EXTRACTION_NAME=
name, SAVEFILE_BASENAME=
filepath, /REUSE_MODELS, SRCLIST_FILENAME=
filepath, EMAP_BASENAME=
name, MIN_NUM_CTS=
value, BACKGROUND_IMBALANCE_THRESHOLD=
value, COMPACTNESS_GAIN=
value,
/PAUSE_FOR_REVIEW, VERBOSE=
value, THETA_RANGE=[
value,
value]
EXAMPLE:
idl
tee ae_better_backgrounds_1875.log
.run ae_recipe
ae_better_backgrounds, '1875', EVTFILE_BASENAME='spectral.evt'
This tool builds and stores models for all the sources in the catalog using single-observation photometry calculated by the MERGE_OBSERVATIONS stage of AE, then uses those source models to construct background regions and spectra.
Only two parameters are required, as shown above.
- The tool uses the observation name (obsname) parameter to construct a directory path ../obsXXXX/ where it expects to find various observation data products (with the standard names used by our AE recipe).
- The EVTFILE_BASENAME parameter specifies the filename for the event list (in ../obsXXXX/) from which you wish to extract background spectra.
This event list should be the same one from which you extracted source spectra, and should not have the point sources masked.
The optional parameters that may be commonly useful are:
- The BACKGROUND_MODEL_FILENAME parameter can be used to supply a model (FITS image) of any background component not represented by the point sources in the catalog.
For example such a model could be constructed for readout streaks so that their contribution to point source backgrounds can be modeled during the construction of background regions.
The FITS image supplied should be in units of observed counts (i.e. the effects of exposure variation should be represented in the model). As of January 2009 this option has not been tested very well.
- The EXTRACTION_NAME parameter is described in §7.3.
For unusual circumstances, these optional parameters are provided:
- The initialization of the algorithm's data structures (source models) takes considerable time.
These data structures are saved in an IDL ``save file'' named ``ae_better_backgrounds.sav'' by default; a different name can be supplied via SAVEFILE_BASENAME.
If /REUSE_MODELS is supplied then these data structures are restored from the file rather than constructed.
This mechanism allows you to run ae_better_backgrounds on a sub-catalog containing just a few sources using a complete set of source models that were saved from a prior run of ae_better_backgrounds on the full catalog.
- By default the source list is read from ../obsXXX/all.cat; you can specify a different file path via the optional SRCLIST_FILENAME parameter.
- By default the input exposure map is read from ../obsXXX/obs.emap; you can specify a different file name in ../obsXXX/ via the optional EMAP_BASENAME parameter.
- The keyword MIN_NUM_CTS (default 5) specifies the minimum number of counts you desire in the background spectrum for this single observation.
- The BACKGROUND_IMBALANCE_THRESHOLD parameter is a unit-less threshold on the background imbalance metric described earlier.
- The COMPACTNESS_GAIN parameter is a unit-less parameter that adjusts the relative importance of the compactness term in the background region metric we are minimizing.
- The VERBOSE and /PAUSE_FOR_REVIEW parameters can be used to see more details of the computations.
- The THETA_RANGE parameter can be used to select a subset of sources for which background regions will be defined, based on their off-axis angles.
One might take the trouble to reduce processing time by using this capability to process on-axis sources with an exposure map binned finely and to process off-axis sources with an exposure map binned coarsely.
For each source the following files are produced:
- {sourcename}/{obsname}/background_pixels.reg:
- a ds9 region file marking the exposure map pixels which define the background region. This region file is displayed by the SHOW_REGIONS stage (§7.8).
- {sourcename}/{obsname}/background.emap:
- the background exposure map (which defines the background region)
- {sourcename}/{obsname}/background.evt:
- the events falling in the background region
- {sourcename}/{obsname}/background.pi:
- the spectrum corresponding to background.evt
- {sourcename}/{obsname}/obs.stats:
- a FITS file containing keyword information about this observation of the source
Next: 7.15 Adjust BACKSCAL Stage
Up: 7 Using ACIS Extract
Previous: 7.13 EXTRACT_BACKGROUNDS Stage
Patrick Broos
Penn State Department of Astronomy
2009-08-12