From f9e54b6739c3df2ef7fcf2c48325107980c7dba2 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins <jrollins@finestructure.net> Date: Wed, 23 May 2018 14:03:00 -0700 Subject: [PATCH] test: specify comparison tolerance in variable --- gwinc/test/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gwinc/test/__main__.py b/gwinc/test/__main__.py index 10cf9d2f..adf700b6 100644 --- a/gwinc/test/__main__.py +++ b/gwinc/test/__main__.py @@ -21,6 +21,7 @@ from .. import load_ifo, gwinc FLO = 5 FHI = 6000 NPOINTS = 3000 +FRACTIONAL_TOLERANCE = 0.01 # comparisons to skip SKIP = [ # 'Seismic', @@ -113,7 +114,7 @@ def main(): diff = np.sqrt(mnoise) - np.sqrt(noise) frac = abs(diff / np.sqrt(noise)) - if max(frac) < 0.01: + if max(frac) < FRACTIONAL_TOLERANCE: continue logging.warning("EXCESSIVE DIFFERENCE: '{}'".format(name)) -- GitLab