The following example reproduces that in *imcnts* - Find background subtracted counts for a point source, but using celestial coordinates sky (world), and using different size source and background regions.
input file: xdata$rp110590.qp
output file: rps90_cnt.tab
xr> xspatial # Load the spatial package xs> imcnts # Run the task to count photons source image file : xdata$rp110590.qp # Input file source region descriptor : c 22:08:41.6 45:45:04.7 3' # Circle at RA=22h 08m 41.6s, Dec 45 deg 45' 04.7'' # with radius of 3 arcmin background image file or cts/pixel: xdata$rp110590.qp # From the same file bkgd region descriptor: a 22:08:41.6 45:45:04.7 3.3' 4.4' # Annulus # of 3.3 to 4.4 arcmin radii, centered at the source position root name for output file [root_cnt.tab]: rps90 # Output table rps90_cnt.tab
It is also possible to combine pixel and sky coordinates. For example c 232 313 2 is equivalent to c 232 313 240 for the ROSAT PSPC (0.5 per pixel).