Skip to content

Commit

Permalink
relative uncertainty should be >= 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jvavrek committed May 13, 2024
1 parent 03d6f5e commit 35931b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion becquerel/core/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ def param_rel_unc(self, param) -> float:
Relative error of fit parameter `param`
"""
if self.param_unc(param):
return self.param_unc(param) / self.param_val(param)
return self.param_unc(param) / np.abs(self.param_val(param))
return None

def param_val_and_unc(self, param: str) -> ufloat:
Expand Down

0 comments on commit 35931b7

Please sign in to comment.