Commit 646c65e6 authored by Edward Fauchon-Jones's avatar Edward Fauchon-Jones
Browse files

Up mass interfield check to allow tolerance

parent 0dcd7f35
Pipeline #12571 passed with stage
in 1 minute and 11 seconds
......@@ -480,7 +480,7 @@ class MassOrdering(InterfieldSpec):
mass1 = sim.att('mass1')
mass2 = sim.att('mass2')
if mass1 >= mass2:
if mass1 >= mass2 or isclose(mass1, mass2, rel_tol=1e-5):
return err.ValidInterfield(self)
else:
return err.InvalidInterfield(self)
......@@ -600,9 +600,9 @@ class MassVsTimeOrdering(InterfieldSpec):
if not isinstance(mass2VsTimeValid, err.Valid):
return err.InvalidInterfields(self)
mass1VsTime = sim['mass1-vs-time/Y'][0]
mass2VsTime = sim['mass2-vs-time/Y'][0]
if mass1VsTime >= mass2VsTime:
mass1 = sim['mass1-vs-time/Y'][0]
mass2 = sim['mass2-vs-time/Y'][0]
if mass1 >= mass2 or isclose(mass1, mass2, rel_tol=1e-5):
return err.ValidInterfield(self)
else:
return err.InvalidInterfield(self)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment