compute_fwhm#
- stellarphot.photometry.source_detection.compute_fwhm(ccd, sources, fwhm_estimate=5, x_column='xcenter', y_column='ycenter', fit=True, sky_per_pix_avg=0)[source]#
Computes the FWHM in both x and y directions of sources in an image.
- Parameters:
- ccd
astropy.nddata.CCDData The CCD Image array.
- sources
astropy.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
sourcesthat contains the x positions of the sources.- y_columnstr, optional (default=’ycenter’)
The name of the column in
sourcesthat contains the y positions of the sources.- fitbool, optional (default=True)
If
True, fit a 2D Gaussian to each source to estimate its FWHM. IfFalse, 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.
- ccd
- Returns:
- fwhm_x, fwhm_ytuple of np.array float
The FWHM of each source in the x and y directions.