3 from __future__
import print_function
4 from builtins
import range
7 import period_run_lists
as pr
14 if (the_grl.find(
"FD")>-1 ):
17 elif (the_grl.find(
"ND")>-1 ):
21 print(
"Expecting a grl name as argument with fd_ or nd_ in the name. Please try again...")
24 print(
"Detector: ",DET)
28 with
open(the_grl,
"r") as f: 33 run_in_grl = row.split(
' ')[0]
34 grl_runs.append(run_in_grl)
36 for i
in range(0, len(grl_runs)):
37 grl_runs[i] = np.int64(grl_runs[i])
39 good_runs = pa.DataFrame(grl_runs, columns = [
'Runs'])
40 good_runs.drop_duplicates(subset =
"Runs",
41 keep =
"first", inplace =
True)
44 for index, row
in runs_df.iterrows():
46 period_runs = pa.DataFrame(runs, columns = [
'Runs'])
47 not_on_grl =
list( set(period_runs[
'Runs'].values) - set(good_runs[
'Runs'].values) )
51 nruns = len(period_runs)
52 nruns_not_on_grl = len(not_on_grl)
57 nruns_on_grl = nruns - nruns_not_on_grl
60 print(
"Percentage (number) of the %d runs from %s that are on this grl: %3.2f %% (%d)"%(nruns,row[
'Period'],frac_good,nruns_on_grl))
void split(double tt, double *fr)
procfile open("FD_BRL_v0.txt")