Skip to content

Commit

Permalink
Only disable pull calculation if constraint is too small relative to …
Browse files Browse the repository at this point in the history
…input unceratinty
  • Loading branch information
adewit committed Oct 9, 2024
1 parent 89dc5a2 commit 8eb22b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/calculate_pulls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def compat(x, x0, sx, sx0):

def diffPull(x, x0, sx, sx0):
# as defined in http://physics.rockefeller.edu/luc/technical_reports/cdf5776_pulls.pdf
if abs(sx * sx - sx0 * sx0) < 0.001:
# The following protection checks the relative size of the constraint wrt the input uncertainty
if abs((sx * sx - sx0 * sx0)/(sx0 * sx0)) < 0.001:
return [0, 999]
elif sx > sx0:
return [0, 999]
Expand Down

0 comments on commit 8eb22b1

Please sign in to comment.