New Astropy error for out of bound parameter values that cause nan and inf values.
NonFiniteValueError: Objective function has encountered a non-finite value, this will cause the fit to fail!
Please remove non-finite values from your input data before fitting to avoid this error.
There are two solutions to this:
Limit the model params to avoid any nan values.
PSFConvolvedModel2D should return a value of 1e99 for example to divert the fitter when it wonders off into invalid values.
I think for now, doing both would be acceptable. Point (2) is needed because we cannot provide bounds for every model and users will probably want to use custom models.
100 adds bounds to Sersic models. This means that PetroFit is not recommended with astropy v5.1. I will keep this ticket open until v5.2 or v5.1.1 is released.
New Astropy error for out of bound parameter values that cause
nan
andinf
values.There are two solutions to this:
PSFConvolvedModel2D
should return a value of1e99
for example to divert the fitter when it wonders off into invalid values.I think for now, doing both would be acceptable. Point (2) is needed because we cannot provide bounds for every model and users will probably want to use custom models.