Skip to content

Commit

Permalink
Merge pull request #141 from Chamani8/master
Browse files Browse the repository at this point in the history
Set weight=0 for obsdata = nans or infs
  • Loading branch information
karllark authored Feb 19, 2025
2 parents 43d86bd + c163325 commit 7de4bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion measure_extinction/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def fit_weights(self, obsdata):
for cspec in list(obsdata.data.keys()):
# base weights
self.weights[cspec] = np.full(len(obsdata.data[cspec].fluxes), 0.0)
gvals = obsdata.data[cspec].npts > 0
gvals = (obsdata.data[cspec].npts > 0) & np.isfinite(obsdata.data[cspec].fluxes)
self.weights[cspec][gvals] = 1.0 / obsdata.data[cspec].uncs[gvals].value

x = 1.0 / obsdata.data[cspec].waves
Expand Down

0 comments on commit 7de4bd1

Please sign in to comment.