Skip to content

Commit

Permalink
fix the mask in the CHISQ_TOT calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Nov 4, 2024
1 parent 03660f3 commit 9fc9d96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/rvspecfit/spec_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,9 @@ def get_chisq(specdata,

cur_deviation = ((curmodel - curdata.spec) / curdata.espec)
if curdata.badmask is not None:
cur_mask = curdata.badmask
cur_mask = ~curdata.badmask
else:
cur_mask = np.zeros(len(cur_deviation), dtype=bool)
cur_mask = np.ones(len(cur_deviation), dtype=bool)
cur_true_chisq = np.sum(cur_deviation[cur_mask]**2)
chisq_array.append(cur_true_chisq)
cur_npix = cur_mask.sum()
Expand Down

0 comments on commit 9fc9d96

Please sign in to comment.