Region Descriptors

As noted above, there are multiple levels of filtering and masking employed by mosspectra and pnspectra. The first filter is for pattern and flag and the largest possible FOV. The second filter defines the region of interest and is taken from an ascii file specified by the user in the regionfile parameter. This filter expression is, quite literally, concatenated onto the end of the first filter. The third filter uses the P-bkgregBdet.fits file to exclude the locations of point sources, and it is concatenated onto the end of the previous expression. Thus, the ascii file defining the region must be constructed carefully, and in detector coordinates.

The region descriptors in the ascii files, which we have named regm1.txt, regm2.txt, and regpn.txt for convenience, can be created easily using the xmmselect task in SAS. Using the xmmselect GUI, produce an image of the sky in detector coordinates (i.e., click the square boxes for DETX and DETY and then click Image, and then Run in the pop-up evselect GUI). In the image displayed in the ds9 window, define the desired region, and then click the 2D region button in the xmmselect GUI which will transfer the region descriptor to the Selection expression window. The region descriptor can then be copied to the reg*.txt file where the symbols “&&” must be added to the start of the string, for example:

&&((DETX,DETY) IN circle(300,500,1200))

where the numbers 300 and 500 are the DETX and DETY coordinates of the center of the extraction region and 1200 is the radius of the circular region. All numbers are in units of $0.05''$ so the specified region is $60''$ in radius. This process needs to be done separately for all instruments as the detector coordinates for a given sky region are different in each detector. To create an annulus extraction region, for instance for a $30''-60''$ degree annulus, the region expression is:

&&((DETX,DETY) IN circle(300,500,1200))
&&!((DETX,DETY) IN circle(300,500,600))


where the “!” sign is for the Boolean “not”.

A number or users have noted that evselect has an option

MASK(FILENAME)

that allows one to use an image mask to select the events to be extracted, which allows one to build very complex extraction regions. However,
1. because the extraction regions used by mosspectra and pnspectra use detector coordinates, the mask must also be in detector coordinates. We do not yet have a tool to rotate/recast a sky coordinate image into a detector coordinate image.
2. through some subtlety that we have not yet identified, detector coordinate masks seem to work with pnspectra but not for mosspectra.
We do hope to have this working by the next release.