And if the Source is Really Big....

Let us assume, for the moment, that you are interested in the diffuse cosmic X-ray background from an observation that has an extended source in the middle of it that you want to remove. For example, a galaxy at a certain ($\alpha$,$\delta$) with semi-major axes ($a$,$b$) and a position angle $P$ (as usual, measured counter clockwise from North). You will need to convert those quantities into detector coordinates. The ($\alpha$,$\delta$) can be converted to ($detx$,$dety$) with esky2det. The ($a$,$b$) can be converted to detector coordinates by scaling to $0\farcs05$ pixels. The position angle is a bit trickier as that will depend upon the detector. The spacecraft “up” for which the roll is measured is the +Y axis (detector coordinates) for MOS1, the +X axis for MOS2, and the -X axis for the pn. This means that the rotation for the region needs to be:

roll angle - $P$ + 90.0 degrees
roll angle - $P$ degrees
roll angle - $P$ +180.0 degrees

Converting a region from sky to detector coordinates can also be done with convregion. However, convregion does not yet have the full functionality that may be required for more complex regions (i.e., regions other than circles and ellipses) and convregion does not calculate the rotation.