=head1 NAME imcore_conf - catalogue generating package =head1 SYNOPSIS B I I I I I I =head1 DESCRIPTION B performs standard object detection and parameterisation on the FITS image I, optionally using a confidence map I. If no confidence map is to be used, I should be specified as C. The four remaining command line parameters control the image detection, crowded field option and scale size for the aperture photometry. The output is a FITS binary table catalogue, with a copy of the FITS image header information plus some additional derived parameters. The name of the output catalogue is derived from the I rootname and will be of the generic form I. Pre-existing catalogue files with this name will be automatically clobbered. In addition to photometric and astrometric parameters, each detected object has assorted shape information derived based on the flux distribution within the detecxtion isophote (for more details on the methodology and the catalogue parameter set see B. Single or multi-extension input FITS images may be processed. For each extension processed, a regions file for the DS9 image display tool is produced (these can be loaded from C in the C menu), containing commands to plot an ellipse for each of the detected sources in the input catalogue list. These files are named by appending F<_n_cat.ell> to the filename of the input image (after removing any F<.fit> extension), where I is the number of the corresponding extension in the output catalogue file (numbered from 1). A global background following algorithm (see previous references) is used to track varying background over each image. The default scale size for background following is 64 pixels - a compromise between accurately following rapidly varying background and error in the local background estimator. The initial background value in each 64x64 pixel image section is derived using a robust iterative k-sigma clipped median estimator, where 'sigma' is derived using a MAD (Median of the Absolute Deviation from the median) estimator. The resulting array of background values are then further filtered to remove corrupting values from eg. bright stars, and this filtered coarse grid is bilinearly interpolated back to the original pixel resolution. Image detection is then based on searching for connected series of contiguous pixels sticking above a user-specified threshold I and above a specified minimum size I. Pixels flagged in the confidence map as having zero weight, or having NULL pixel values in the image, are ignored during the background estimation phase. The confidence map is used to fully weight pixels for image detection (based on their predicted noise properties), and thereby automatically compensates for varying noise levels (eg. due to different exposures in stacked dither images) within the image. The current version does not make further use of this weight information in deriving object parameters. For each detected object a series of fixed apertures of base radius I are overlaid on the object and the background-corrected flux summed over the region. Proportionating the flux across boundary pixels, a soft-edged aperture, compensates for pixel edge effects. The full list of catalogue parameters is shown in http://www.ast.cam.ac.uk/vdfs/documentation.html. For more details on image detection and parametersiation see http://www.ast.cam.ac.uk/vdfs/publications.html. =head1 OPTIONS The following command-line arguments are required: =over =item I Standard FITS images either single or multiextension are supported. =item I Uses the confidence map from I in the analysis. If a filename of I is specified no confidence map is used in the analysis. =item I The minimum size of source to be extracted, in pixels. The minimum allowed value, for this parameter is C<4>. This is also the recommended setting for general purpose deep image detection. Note that this parameter must be an integer. In conjunction with the threshold this determines how deep and how small "real" images can be. The recommended value precludes many of the few pixel-hit cosmic rays/spurions from being considered since "real" images must have B contiguous simply-connected pixels in the union of the detection filter and data domains. =item I A sensible default is to set this to 1.5 skynoise (skynoise is computed automatically) as a compromise between detecting close to the limit of the data and not being swamped by spurious sources. It is possible to push the data limit fainter but at the expense of a large increase in spurious sources. =item I Crowded field analysis flag. I should be C<0> to turn off the image deblending option, and C<1> to turn it on. The latter is the usual option of choice. The detection algorithm tries to disentangle overlapping images or images supperposed on the "slowly" varying background of other large images otherwise just straighforward isophotal detection. =item I Radius of aperture for default profile fit in photometry, in pixels, ideally should be set to expected for image, though exact value (ie. within 25%) is not critical and it is often preferable to use a fixed value for processing. It is straighforward to show that if rcore = FWHM then for typical profiles encountered the rcore flux estimate has between 80-90% of the accuracy of an idealised perfectly known PSF model method. The remaining apertures are scaled from this. The following parameter is optional: =item B=I This can be used to override the default background gridding parameter of 64 pixels. The default works well in most situations and it is not recommended to make this parameter smaller than ~32 pixels, otherwise instabilities in the background estimation will result. =back =head1 EXAMPLES Perform source detection on F using a confidence map F, with typical values for the I, I, I and I parameters. imcore_conf image.fit conf.fits 5 1.5 1 4 The same, except using no confidence map and a different background analysis size. imcore_conf image.fit noconf 5 1.5 1 4 nbsize=48 NB. In standalone use should also be run in conjunction with the following software: I to provide astrometric calibration; and I to provide general purpose image morphogical classification. =head1 AUTHOR Mike Irwin (mike@ast.cam.ac.uk), Jonathan Irwin (jmi@ast.cam.ac.uk) =cut