diff options
author | tlatorre <tlatorre@uchicago.edu> | 2020-11-17 07:58:41 -0600 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2020-11-17 07:58:41 -0600 |
commit | 9ddb79bb708b0581462ccacb360df5cd77b2d150 (patch) | |
tree | d1ebefa52d8290d19ae7e403364d85229f4ac5b4 /utils/plot-neutrons | |
parent | 2edfaebf9ed99b489b7cbbd1ea6063a6940be854 (diff) | |
download | sddm-9ddb79bb708b0581462ccacb360df5cd77b2d150.tar.gz sddm-9ddb79bb708b0581462ccacb360df5cd77b2d150.tar.bz2 sddm-9ddb79bb708b0581462ccacb360df5cd77b2d150.zip |
small fixes
Diffstat (limited to 'utils/plot-neutrons')
-rwxr-xr-x | utils/plot-neutrons | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/plot-neutrons b/utils/plot-neutrons index 18108f8..291b890 100755 --- a/utils/plot-neutrons +++ b/utils/plot-neutrons @@ -99,30 +99,30 @@ if __name__ == '__main__': print("neutrons with nhit > 100") print(atm[atm.nhit_neutron >= 100][['run','gtid_neutron','nhit_neutron','nhit_cal_neutron']]) - fig = plt.figure() + fig = plt.figure(1) plt.hist(atm.nhit_cal_neutron.values,bins=np.linspace(0,100,101),histtype='step',color='C0',label="Data") weights = np.tile(len(atm)/len(atm_mc),len(atm_mc)) plt.hist(atm_mc.nhit_cal_neutron.values,bins=np.linspace(0,100,101),weights=weights,histtype='step',color='C1',label="Monte Carlo") plt.xlabel("Nhit") despine(fig,trim=True) plt.tight_layout() - plt.legend() + plot_legend(1) if args.save: plt.savefig("neutron_nhit_cal.pdf") plt.savefig("neutron_nhit_cal.eps") else: plt.title("Neutron Nhit Distribution") - fig = plt.figure() + fig = plt.figure(2) dt = (atm.gtr_neutron - atm.gtr)/1e6; bins = np.linspace(20e-3,250,101) plt.hist(dt,bins=bins,histtype='step',color='C0',label="Data") dt = (atm_mc.gtr_neutron - atm_mc.gtr)/1e6; plt.hist(dt,bins=bins,weights=weights,histtype='step',color='C1',label="Monte Carlo") - plt.xlabel(r"$\Delta t (ms)$") + plt.xlabel(r"$\Delta$ t (ms)") despine(fig,trim=True) plt.tight_layout() - plt.legend() + plot_legend(1) if args.save: plt.savefig("neutron_delta_t.pdf") plt.savefig("neutron_delta_t.eps") |