diff --git a/hepdata_converter/writers/yoda_writer.py b/hepdata_converter/writers/yoda_writer.py index 909a69e..d936851 100644 --- a/hepdata_converter/writers/yoda_writer.py +++ b/hepdata_converter/writers/yoda_writer.py @@ -153,7 +153,8 @@ def _create_estimate(self): if idx not in global_indices: global_indices.append(idx) # construct Estimate - rtn.bin(idx).setVal(self.yval[i]) + y = abs(self.yval[i]) if math.isnan(self.yval[i]) else self.yval[i] + rtn.bin(idx).setVal(y) self._set_error_breakdown(i, rtn.bin(idx)) del global_indices return rtn