Object catalogue generation¶
In order to provide astrometric and photometric calibration information, HDRL implements a functionality to generate a catalogue of detected objects (i.e. stars, galaxies).
Objects are detected and parametrised using the processed input image and an optional confidence map. A confidence map is similar to a weight map. It gives an indication of the relative quantum efficiency of each pixel, rather than an indication of the Poisson uncertainty on the pixel flux and should be normalised to a mean of 100. “Bad” pixels (either dead or hot) are given a confidence value of zero.
A high-level summary of the implemented data reduction sequence is:
estimate the local sky background over the image and track any variations at adequate resolution to eventually remove them
detect objects/blends of objects and keep a list of pixels belonging to each blend for further analysis
parametrise the detected objects, i.e. perform astrometry, photometry and a shape analysis
In PyHDRL this is hdrl.func.Catalogue.
Algorithm¶
If requested (bkg_estimate) the possibly-varying sky background is
estimated and removed automatically, prior to object detection, using
a combination of robust iteratively-clipped estimators.
Any variation in sky level over the frame is dealt with by forming a
coarsely sampled background map grid (specified by
bkg_mesh_size). Within each background grid pixel, an iteratively
k-sigma clipped median value of sky is computed. A robust estimate of
sigma is computed by using the Median of the Absolute Deviation (MAD)
from the median.
Individual objects are detected using a “standard match” filter
approach. The majority of objects detected in this way will have a
shape dominated by the PSF, which thereby defines the filter to use
(controlled by bkg_smooth_fwhm).
To be detected an object should consist of at least
obj_min_pixels contiguous pixels above a threshold controlled by
obj_threshold × sky-rms. A deblending algorithm
(obj_deblending) can be activated to disentangle overlapping
objects.
The effective gain (det_eff_gain) and the saturation limit
(det_saturation) must also be specified. The gain is mainly used
for the error estimation of the various object measurements whereas
the saturation limit is used to mark and exclude saturated pixels.
resulttype selects the requested output using bitwise flags:
1: background image only
2: segmentation map only
4: complete catalogue only
7: all outputs (background, segmentation map, and catalogue)
Compute¶
compute() takes a cpl.core.Image (units of ADU), an optional
confidence map (cpl.core.Image or None) and an optional
cpl.drs.WCS (or None). It returns a
hdrl.func.CatalogueResult with catalogue (cpl.core.Table),
segmentation_map (cpl.core.Image), background
(cpl.core.Image) and qclist (cpl.core.PropertyList).
cat = hdrl.func.Catalogue(
obj_min_pixels=10,
obj_threshold=3.0,
obj_deblending=True,
obj_core_radius=2.0,
bkg_estimate=True,
bkg_mesh_size=64,
bkg_smooth_fwhm=2.0,
det_eff_gain=1.0,
det_saturation=65535.0,
resulttype=7,
)
result = cat.compute(image, wcs=wcs)
catalogue = result.catalogue
segmap = result.segmentation_map
background = result.background
qc_info = result.qclist