autoregions
Define source and background extraction regions with maximum signal/noise ratio, to be used with cdfs-extract to extract XMM-Newton spectra, photometry and lightcurves.
The above image shows two examples of extraction regions in an XMM-Newton observation, whose radii where automatically computed by autoregions. Solid circles: source regions; dashed annuli: background regions.
USAGE
- Download the programme as a zip archive and extract it. (Or, if you prefer, go to the source repository in github);
- setup the PostgreSQL database containing the catalogue;
- personalize your queries by editing two source files (see below);
- call: ./autoregions.pl [--cached] [--maxsep=m]
Since steps #2 and #3 may be tricky and not fully documented, it is strongly advised that you contact me (pranalli.github@gmail.com) if there is any uncertainty about how to proceed.
DESCRIPTION
Given a catalogue of sources, stored in a database (currently PostgreSQL), this programme computes extraction regions for its companion programme cdfs-extract.
Source regions are circles, whose radii are chosen by maximizing the expected signal/noise ratio, given the source counts and the background surface brightnesses. The signal/noise ratio is defined in the same way as in the XMM-Newton SAS task eregionanalyse.
Background regions are annuli with inner and outer radii equal to 1.5 and 2 times, respectively, the source region radius.
Overlapping regions are identified, and excised unless they are too close.
Using this program is easy, but the documentation is currently incomplete, and also it requires non-trivial preparation steps. Therefore, it is strongly advised that the user contacts the author ( pranalli.github@gmail.com ) if there is any uncertainty about how to proceed.
In particular, the user should:
- setup a PostgreSQL database holding the source information and the haversine distance function;
- edit two files: the PDL::PGSQL package (which contains the access info to the database) and the Query package (which contains the SQL queries; more info can be obtained with the command "perldoc Query.pm");
- install two Perl libraries: PDL (including PDL::Minuit) and Moose. These are available in the repositories of most Linux distributions and (for Mac users) in Macports.
Some documentation about the database is present in the README.SQL file (included among the programme files), and PostgreSQL is very easy to install.
For further information, see also the following papers:
* Ranalli, Georgantopoulos, Corral, et al. 2015, "The XMM-Newton survey in the H-ATLAS field", accepted by Astronomy & Astrophysics
* Fotopoulou et al., in preparation
SIGNAL/NOISE RATIO MAXIMIZATION
Find best extraction radius given source and bkg counts, using the same algorithm of eregionanalyze:
ALGORITHM
TOTAL_SRC_COUNTS = counts in the input image within the source region corrected for the encircled energy fraction of the source region (i.e.: SCTS in the emldetect output) Loop: maximize S/N ratio using Minuit. At each iteration do: EEF = calculate encircled energy fraction for this TEST_RADIUS using the PSF relevant for the PN camera at 6 arcmin off-axis and for a photon energy of 2 keV SRC_COUNTS = TOTAL_SRC_COUNTS * EEF BGD_COUNTS = background counts per arcsec^2 * PI * TEST_RADIUS**2 S/N ratio = SRC_COUNTS / sqrt(SRC_COUNTS + BGD_COUNTS) EndLoop
IMPLEMENTATION
Since we cannot (yet) tune the region for different event files, a single average combination of off-axis angle, energy and camera is used: PN, 2 keV, 6 arcmin off-axis.
The fit is done with Minuit (through PDL::Minuit).
AUTHOR
Piero Ranalli
Post-doc researcher at IAASARS, National Observatory of Athens, Greece; Associate of INAF -- Osservatorio Astronomico di Bologna, Italy.
LICENSE
Copyright (C) 2014 Piero Ranalli
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Last updated: 2014-11-10.