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:
modelImageModel

The input ImageModel of a single image. The input image is assumed to be background subtracted.

snr_thresholdfloat

The signal-to-noise ratio per pixel above the background for 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 a True value indicates the corresponding element of model.data is masked. Masked pixels will not be included in any source.

starfinder_namestr, optional

The photutils star finder to use. Options are ‘dao’, ‘iraf’, or ‘segmentation’:

starfinder_kwargsdict, optional

Additional keyword arguments to be passed to the star finder. for ‘segmentation’, these can be kwargs to photutils.segmentation.SourceFinder and/or photutils.segmentation.SourceCatalog. for ‘dao’ or ‘iraf’, these are kwargs to photutils.detection.DAOStarFinder or photutils.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:
catalogTable

An astropy Table containing the source catalog.

segmentation_imagendarray or None

The segmentation image, or None if not applicable.