You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cabinetry/visualize/plot_model.py
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -145,12 +145,15 @@ def data_mc(
145
145
n_zero_pred=sum(total_yield==0.0) # number of bins with zero predicted yields
146
146
ifn_zero_pred>0:
147
147
log.warning(
148
-
f"predicted yield is zero in {n_zero_pred} bin(s), excluded from ratio plot"
148
+
f"predicted yield is zero in {n_zero_pred} bin(s),\
149
+
excluded from ratio plot"
149
150
)
150
151
nonzero_model_yield=total_yield!=0.0
151
152
152
153
ifnp.any(total_yield<0.0):
153
-
raiseValueError(f"{label} total yield {total_yield.tolist()} has negative bin(s)")
154
+
raiseValueError(
155
+
f"{label} total yield {total_yield.tolist()} has negative bin(s)"
156
+
)
154
157
155
158
# add uncertainty band around y=1
156
159
rel_mc_unc=total_model_unc/total_yield
@@ -355,12 +358,16 @@ def templates(
355
358
356
359
ifnp.any(nominal_histo["yields"] <0.0):
357
360
log.warning(
358
-
f"{label} nominal histo yield {nominal_histo['yields'].tolist()} has negative bin(s), taking absolute value for yerr on template ratio plot uncertainty"
0 commit comments