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
For ‘dao’ and ‘iraf’, either old-style or new-style keyword argument names may be used regardless of the installed photutils version. They are automatically translated to match the installed version:
sharplo,sharphi<->sharpness_rangeroundlo,roundhi<->roundness_rangepeakmax<->peak_maxbrightest<->n_brightestminsep_fwhm->min_separation
If both old-style and new-style keyword arguments are given for the same parameter, the style matching the installed photutils version takes precedence.
Note that
minsep_fwhmis converted to pixels using the formulamin_separation = max(2, int(minsep_fwhm * kernel_fwhm + 0.5))to be consistent with the way that IRAFStarFinder handles this parameter.
- model
- Returns:
- catalog
Table An astropy Table containing the source catalog.
- segmentation_imagendarray or None
The segmentation image, or None if not applicable.
- catalog