compute_fwhm#

stellarphot.photometry.source_detection.compute_fwhm(ccd, sources, fwhm_estimate=5, x_column='xcenter', y_column='ycenter', fit_method=FwhmMethods.FIT, sky_per_pix_avg=None, sky_per_pix_column=None)[source]#

Computes the FWHM in both x and y directions of sources in an image.

Parameters:
ccdastropy.nddata.CCDData or numpy.ndarray

The CCD Image array.

sourcesastropy.table.Table

An astropy table of the positions of sources in the image.

fwhm_estimatefloat, optional (default=5)

The initial guess for the FWHM of the sources in the image.

x_columnstr, optional (default=’xcenter’)

The name of the column in sources that contains the x positions of the sources.

y_columnstr, optional (default=’ycenter’)

The name of the column in sources that contains the y positions of the sources.

fitbool, optional (default=True)

If True, fit a 2D Gaussian to each source to estimate its FWHM. If False, estimate the FWHM of each source by computing the second moments of its light distribution using photutils.

sky_per_pix_avgfloat or array-like of float, optional (default=0)

Sky background to subtract before centroiding. Cannot specify both sky_per_pix_avg and sky_per_pix_column.

sky_per_pix_columnstr, optional

The name of the column in sources that contains the sky background values for each source. This is used to subtract the sky background from the cutout before computing the FWHM. Cannot specify both sky_per_pix_avg and sky_per_pix_column.

Returns:
fwhm_x, fwhm_ytuple of np.array float

The FWHM of each source in the x and y directions.