fast_fwhm_from_image#
- stellarphot.photometry.source_detection.fast_fwhm_from_image(ccd, fwhm_estimate, noise=10, n_brightest_sources=30, max_adu=40000, block_size=8, min_block_fwhm=1, aggregate_by='mean')[source]#
Compute the FWHM of a CCD image by block reducing it, running source detection on the reduced image, and then computing the FWHM of the detected sources in the original image.
- Parameters:
- ccd
numpy.ndarrayorastropy.nddata.CCDData The CCD image array.
- fwhm_estimatefloat
The initial estimate for the FWHM of the sources in the image.
- noisefloat, optional
The estimated noise in the image.
- n_brightest_sourcesint, optional
The number of brightest sources to use for the FWHM estimate.
- max_adufloat, optional
The maximum ADU value for a pixel in the image. Sources with peak fluxes greater than this value will be ignored.
- block_sizeint, optional
The size of the blocks to use for block reduction. The image will be divided into blocks of this size, and source detection will be done on the reduced image.
- min_block_fwhmfloat, optional
The minimum FWHM to allow after the block reduction. If the estimated FWHM is smaller than this value, the block size will be changed.
- aggregate_bystr, optional
The method to use for aggregating the FWHM estimates. Can be ‘mean’ or ‘median’. If None, the FWHM estimates will not be aggregated.
- ccd
- Returns:
- fwhmfloat or np.ndarray
The FWHM of the sources in the image. If
aggregate_byis None, this will be an array of FWHM values for each source. Otherwise, it will be a single value.
Notes
The approach here is to detect sources in the image and measure their FWHM. To keep this reasonably fast, we block reduce the image and then run source detection on the reduced image. We then use the positions of the detected sources to estimate the FWHM of the sources in the original image. Only the brightest sources are used to estimate the FWHM, and sources that are too bright (i.e., have a peak flux greater than
max_adu) are ignored.