Skip to content

fit_salt can return unconverged lightcurve fits #41

@AntoineGillesLordet

Description

@AntoineGillesLordet

I noticed that in skysurvey/lcfit/sncutils.py, the obtained result from sncosmo.fit_lc is converted to a dataframe without any check.

Since sncosmo uses iminuit to fit the lightcurves, it will always return the ending point of the minimization whatever its status is, so assuming that the fit converged if it didn't raise any errors is wrong.

Instead the Result object returned also contains a success attribute to tell wether the fit actually converged and additionnal informations about it in message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions