From 50dc9bd7e41a25401b53339bd49c52f6d246e3a4 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 16 Nov 2020 11:43:40 -0600 Subject: 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. --- utils/chi2 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils/chi2') 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 -- cgit