make_tweakreg_catalog
- jwst.tweakreg.tweakreg_catalog.make_tweakreg_catalog(model, snr_threshold, kernel_fwhm, bkg_boxsize=400, coverage_mask=None, starfinder_name='iraf', starfinder_kwargs=None)[source]
Create a catalog of point-line sources to be used for image alignment in tweakreg.
- Parameters:
model (
ImageModel
) – The inputImageModel
of a single image. The input image is assumed to be background subtracted.snr_threshold (float) – The signal-to-noise ratio per pixel above the
background
for which to consider a pixel as possibly being part of a source.kernel_fwhm (float) – The full-width at half-maximum (FWHM) of the Gaussian kernel used to convolve the image.
bkg_boxsize (float, optional) – The background mesh box size in pixels.
coverage_mask (array_like (bool), optional) – A boolean mask with the same shape as
model.data
, where aTrue
value indicates the corresponding element ofmodel.data
is masked. Masked pixels will not be included in any source.starfinder_name (str, optional) – The
photutils
star finder to use. Options are ‘dao’, ‘iraf’, or ‘segmentation’. - ‘dao’:photutils.detection.DAOStarFinder
- ‘iraf’:photutils.detection.IRAFStarFinder
- ‘segmentation’:photutils.segmentation.SourceFinder
starfinder_kwargs (dict, optional) – Additional keyword arguments to be passed to the star finder. for ‘segmentation’, these can be kwargs to
photutils.segmentation.SourceFinder
and/orphotutils.segmentation.SourceCatalog
. for ‘dao’ or ‘iraf’, these are kwargs tophotutils.detection.DAOStarFinder
orphotutils.detection.IRAFStarFinder
, respectively. Defaults are as stated in the docstrings of those functions unless noted here: - ‘dao’: fwhm=2.5 - ‘iraf’: fwhm=2.5 - ‘segmentation’: npixels=10, progress_bar=False
- Returns:
catalog (
Table
) – An astropy Table containing the source catalog.segmentation_image (
ndarray
or None) – The segmentation image, or None if not applicable.