From 8eb22b17418d589570f37d16bcb1b9379d46f476 Mon Sep 17 00:00:00 2001 From: Adinda de Wit Date: Wed, 9 Oct 2024 13:18:13 +0200 Subject: [PATCH] Only disable pull calculation if constraint is too small relative to input unceratinty --- python/calculate_pulls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/calculate_pulls.py b/python/calculate_pulls.py index 7879ad8a0c8..6fb45574083 100644 --- a/python/calculate_pulls.py +++ b/python/calculate_pulls.py @@ -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]