mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-07-01 17:29:27 +02:00
added attribute sigma to zero within error, npr module improved
This commit is contained in:
parent
f95123bd18
commit
e45f330e9d
2 changed files with 14 additions and 10 deletions
|
@ -337,8 +337,12 @@ class Obs:
|
|||
for e_name in self.e_names:
|
||||
print(e_name, ':', self.e_content[e_name])
|
||||
|
||||
def is_zero_within_error(self):
|
||||
return np.abs(self.value) <= self.dvalue
|
||||
def is_zero_within_error(self, sigma=1):
|
||||
""" Checks whether the observable is zero within 'sigma' standard errors.
|
||||
|
||||
Works only properly when the gamma method was run.
|
||||
"""
|
||||
return np.abs(self.value) <= sigma * self.dvalue
|
||||
|
||||
def is_zero(self):
|
||||
return np.isclose(0.0, self.value) and all(np.allclose(0.0, delta) for delta in self.deltas.values())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue