Input files¶
SourceXtractor++ accepts images stored in FITS [2]. Contrary to the original SExtractor, SourceXtractor++ relies on the FITSIO library and is therefore compatible with all standard variants of FITS, including compressed images. Both “Basic FITS” (one single header and one single body) and MEF files are recognized. Binary SourceXtractor++ catalogs produced from MEF images are MEF files themselves. If the catalog output format is set to ASCII, all catalogs from the individual extensions are concatenated in one big file.
Currently, only the first data-plane of multichannel images with \({\rm NAXIS} > 2\), is loaded.
In SourceXtractor++, as in all similar programs, FITS axis #1 is traditionally referred to as the x axis, and FITS axis #2 as the y axis.
Detection and measurement images¶
SourceXtractor++ distinguishes between two kinds of science images, detection and measurement images ():
The detection image is where the sources are extracted. Rough estimates of position and shapes are obtained from the detection image; they define the photometric apertures and initial guesses for model-fitting parameters that will be applied to the measurement images. Currently there can be only one detection image per run, and sources are detected from a single channel.
Measurement images are where the sources are measured. There can be hundreds (or even more) of them. They need not share the same pixel grid or have the same size as the detection image, which they may only partially overlap. However if the pixel grid is different, both detection and measurement image headers must contain valid WCS information [3, 4]. SourceXtractor++ uses that information to precisely match celestial positions and areas on all images. A scaling parameter for pixel values can be applied to any measurement image independently, provided either as a
flux_scale
optional argument toload_fits_image()
in the Python measurement configuration file, or as the value of a FITS header keyword (FLXSCALE by default). Note that sources need not be detectable at all on measurement images for the software to work.
Weight-maps¶
Both detection and measurement images can have their own weight-maps.
Weight-maps are companion images that indicate how “noisy” every science pixel is, in terms of variance.
The SourceXtractor++ --weight-image
command line option and the load_fits_image()
measurement configuration script command may be used to specify the names of the input detection and measurement weight-maps, respectively.
See the Weighting section for details.
Flag-maps¶
Flag maps are images in integer format having the same dimensions as the science images, with pixel values that can be used to flag some pixels (for instance, “bad” or noisy pixels). Flag map usage is described in the flagging section.
PSF models¶
PSF models must be specified in the model-fitting module. SourceXtractor++ accepts several PSF formats:
using no PSF at all is specified with
.., psf="nopsf",..
in the configuration files (ASCII or python);a constant PSF can be given with a FITS image, and the keyword
SAMPLING
provides the sampling of the PSF image with respect to the corresponding measurement image (SAMPLING=0.5 means the 2 PSF pixels correspond to one pixel in the measurement image);a variable PSF can be provided as FITS binary tables in the PSFEx format.
a variable PSF can be provided in a stacked PSF format. In this FITS format:
the first extension is a primary extension without data;
the second extension is an image extension named
PSF_IMAGE
containing, aligned in a grid (see Figure 2), the PSF data for the various regions in the measurement image. The required keyword`STMPSIZE`
gives the size of the PSF stamp, the keyword`SAMPLING`
its sampling;the third extension is a table extension with the mandatory columns (see Figure 3):
X_CENTER
: the central x-position of a grid PSF;Y_CENTER
: the central y-position of a grid PSF;X
: the x-position center of the area for the corresponding grid PSF;Y
: the x-position center of the area for the corresponding grid PSF;RA
andDEC
: the sky positions for`X`
and`Y`
;
for a source at x_1,y_1 the relevant grid PSF is selected by minimizing the distances to
`X`
,`Y`
, then the PSF stamp is extracted using the values in the columnsX_CENTER`
,`Y_CENTER`
and the keyword`STMPSIZE`
an example for a stacked PSF file is available in the repository SourceXtractor-litmus (requires Git Large File Storage).
One PSF model must be assigned for every measurement image!. In the ASCII configuration file it is possible to define a
Gaussian PSF with the parameters `--psf-fwhm`
and `--psf-pixel-sampling`
. If defined, this Gaussian PSF is being used
for all measurement images that have not en explicit PSF defined in the oython configuration.