Skip to content

Commit

Permalink
Add high flux linearity constraint to avoid craziness.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Oct 31, 2024
1 parent 65a4a88 commit a0b7bca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/lsst/cp/pipe/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,14 @@ def __call__(self, pars):
log_w = np.sqrt(-2.*np.log(fact*self._w[self._w > 0]))
constraint = np.hstack([constraint, log_w])

return np.hstack([resid, constraint])
# Don't let it get to >5% correction.
values = pars[self.par_indices["values"]]
if np.abs(values[-1])/self._nodes[-1] > 0.25:
extra_constraint = 1e10
else:
extra_constraint = 0

return np.hstack([resid, constraint, extra_constraint])


def getReadNoise(exposure, ampName, taskMetadata=None, log=None):
Expand Down

0 comments on commit a0b7bca

Please sign in to comment.