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 input
ImageModelof a single image. The input image is assumed to be background subtracted.- snr_thresholdfloat
The signal-to-noise ratio per pixel above the
backgroundfor which to consider a pixel as possibly being part of a source.- kernel_fwhmfloat
The full-width at half-maximum (FWHM) of the Gaussian kernel used to convolve the image.
- bkg_boxsizefloat, optional
The background mesh box size in pixels.
- coverage_maskarray-like (bool), optional
A boolean mask with the same shape as
model.data, where aTruevalue indicates the corresponding element ofmodel.datais masked. Masked pixels will not be included in any source.- starfinder_namestr, optional
The
photutilsstar finder to use. Options are ‘dao’, ‘iraf’, or ‘segmentation’:‘segmentation’:
photutils.segmentation.SourceFinder
- starfinder_kwargsdict, optional
Additional keyword arguments to be passed to the star finder. for ‘segmentation’, these can be kwargs to
photutils.segmentation.SourceFinderand/orphotutils.segmentation.SourceCatalog. for ‘dao’ or ‘iraf’, these are kwargs tophotutils.detection.DAOStarFinderorphotutils.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
- model
- Returns:
- catalog
Table An astropy Table containing the source catalog.
- segmentation_imagendarray or None
The segmentation image, or None if not applicable.
- catalog