def optimize(self):
    psf = self.epsf.copy()
    psf -= np.min(psf)
    pixels = psf.flatten()
    (binned_radii, binned_pixels, _) = fast_binning(self.radii, pixels, bins=1)
    fwhm = (2 * binned_radii[np.flatnonzero((binned_pixels > (np.max(binned_pixels) / 2)))[(- 1)]])
    return (fwhm, fwhm, 0)
def optimize(self):
    psf = self.epsf.copy()
    psf -= np.min(psf)
    pixels = psf.flatten()
    (binned_radii, binned_pixels, _) = fast_binning(self.radii, pixels, bins=1)
    fwhm = (2 * binned_radii[np.flatnonzero((binned_pixels > (np.max(binned_pixels) / 2)))[(- 1)]])
    return (fwhm, fwhm, 0)