Skip to content

Commit

Permalink
Fix uncertainty assumption in fitting weights
Browse files Browse the repository at this point in the history
  • Loading branch information
nmearl committed Sep 13, 2019
1 parent ea5b526 commit e804847
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specutils/fitting/fitmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def _fit_lines(spectrum, model, fitter=fitting.LevMarLSQFitter(),
uncerts = spectrum.uncertainty

if uncerts is not None:
weights = 1 / uncerts.array
weights = uncerts.array ** -2
else:
logging.warning("Uncertainty values are not defined, but are "
"trying to be used in model fitting.")
Expand Down

0 comments on commit e804847

Please sign in to comment.