aboutsummaryrefslogtreecommitdiff
path: root/utils/chi2
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-11-16 11:43:40 -0600
committertlatorre <tlatorre@uchicago.edu>2020-11-16 11:43:40 -0600
commit50dc9bd7e41a25401b53339bd49c52f6d246e3a4 (patch)
tree85139758d5c1e91d23da5100152310385635d0f3 /utils/chi2
parent9113467ce901c1491bcb369c68cdb9e99116f657 (diff)
downloadsddm-50dc9bd7e41a25401b53339bd49c52f6d246e3a4.tar.gz
sddm-50dc9bd7e41a25401b53339bd49c52f6d246e3a4.tar.bz2
sddm-50dc9bd7e41a25401b53339bd49c52f6d246e3a4.zip
add --run-list argument to chi2 and dm-search
This commit updates the chi2 and dm-search scripts to add the ability to pass a run list on the comand line.
Diffstat (limited to 'utils/chi2')
-rwxr-xr-xutils/chi25
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/chi2 b/utils/chi2
index 39db081..5d56f17 100755
--- a/utils/chi2
+++ b/utils/chi2
@@ -431,6 +431,7 @@ if __name__ == '__main__':
parser.add_argument("--print-nll", action='store_true', default=False, help="print nll values")
parser.add_argument("--walkers", type=int, default=100, help="number of walkers")
parser.add_argument("--thin", type=int, default=10, help="number of steps to thin")
+ parser.add_argument("--run-list", default=None, help="run list")
args = parser.parse_args()
setup_matplotlib(args.save)
@@ -444,6 +445,10 @@ if __name__ == '__main__':
evs.append(get_events(df.filename.values, merge_fits=True, nhit_thresh=args.nhit_thresh))
ev = pd.concat(evs)
+ if args.run_list is not None:
+ runs = np.genfromtxt(args.run_list)
+ ev = ev[ev.run.isin(runs)]
+
ev = correct_energy_bias(ev)
# Note: We loop over the MC filenames here instead of just passing the