Skip to content

Commit c66713d

Browse files
committed
Updates to fraction sum validation plots
1 parent 2b48e00 commit c66713d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

run-validation/flow_validation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,11 @@ def main(flow_file, charge_only):
583583
fractions = flow_h5['mc_truth/packet_fraction/data']['fraction']
584584
summed_fractions = fractions.sum(axis=-1)
585585
fig, ax = plt.subplots(constrained_layout = True)
586-
ax.hist(summed_fractions, bins = np.arange(0.895,1.1,0.01), density = True)
586+
ax.hist(summed_fractions, bins= np.arange(-0.05, summed_fractions.max(), 0.1))
587587
ax.set_title("Sum of packet fractions in each event")
588+
ax.set_yscale('log')
588589
ax.set_xlabel("Sum")
589-
ax.set_ylabel("PDF")
590+
ax.set_ylabel("Count")
590591

591592
output.savefig()
592593
plt.close()

run-validation/larndsim_validation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ def main(sim_file, charge_only):
179179
fractions = mc_packets_assn['fraction']
180180
summed_fractions = fractions.sum(axis=-1)
181181
fig, ax = plt.subplots(constrained_layout = True)
182-
ax.hist(summed_fractions, bins = np.arange(0.895,1.1,0.01), density = True)
182+
ax.hist(summed_fractions, bins= np.arange(-0.05, summed_fractions.max(), 0.1))
183183
ax.set_title("Sum of packet fractions in each event")
184+
ax.set_yscale('log')
184185
ax.set_xlabel("Sum")
185-
ax.set_ylabel("PDF")
186+
ax.set_ylabel("Count")
186187
output.savefig()
187188
plt.close()
188189

0 commit comments

Comments
 (0)