photutils icon indicating copy to clipboard operation
photutils copied to clipboard

Warning about unsuccessful fit

Open astrofrog opened this issue 6 years ago • 3 comments

When doing PSF photometry, I sometimes get warnings about the fit being unsuccessful:

Screenshot from 2019-10-18 13-22-35

However the warning is unhelpful, since it's not clear where to access fit_info.

astrofrog avatar Oct 18 '19 12:10 astrofrog

As I recall users don't actually get access to fit_info, do they? If I'm remembering right, this should come out of the self.fitter call in nstars, at which point we get this warning raised, but then don't allow the user access to self.fitter.fit_info in any obvious way.

The obvious, if slightly over-correcting, answer is to suppress the warning, since it relates to things outside of the scope of the user's access... Or is there a way to overwrite the warning (unlikely) to better tell the user to check the fitter they passed into the function. Does the fit_info attribute of the input fitter keep the fit_info attribute? That doesn't exactly help if they've not passed one and get the LevMarLSQFitter by default and thus can't access the thing at all, but is at least something that could be done. Can't think of any solution that solves all cases except suppressing the warning at the moment though.

Onoddil avatar Oct 21 '19 01:10 Onoddil

Quick bump. Has anything changed related to this as of 1.1.0? I'm very curious if I should be concerned with my fits.

marcusthomas11 avatar Jul 19 '21 19:07 marcusthomas11

Nothing has changed in version 1.1.0 to address this. The best test would be to look at the residual image to see if the fits failed.

larrybradley avatar Jul 20 '21 17:07 larrybradley