Skip to content

Commit

Permalink
kinematics_correlations.py: ak.count -> ak.num where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl committed Jan 29, 2024
1 parent 8ce6084 commit 57ca12e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmarks/dis/analysis/kinematics_correlations.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be
Q2_List_T = Q2values_T #Truth Q2 values, mapped along x axis
Q2_List_Y = Q2values_Y #method (E/DA/JB) Q2 values, mapped along y axis

T_len = ak.count(Q2_List_T,axis=0) #total number of events in Truth
Y_len = ak.count(Q2_List_Y,axis=0) #total number of events in method
T_len = ak.num(Q2_List_T,axis=0) #total number of events in Truth
Y_len = ak.num(Q2_List_Y,axis=0) #total number of events in method

if T_len > Y_len: #if total number of events for Truth is greater
Y_boolean = ak.count(Q2_List_Y,axis=-1) >= 1 #boolean to filter ak.Arrays wrt single events in method
Expand Down Expand Up @@ -103,8 +103,8 @@ def Xcorrelation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be '
X_List_T = Xvalues_T #Truth x values, mapped along x axis
X_List_Y = Xvalues_Y #method (E/DA/JB) x values, mapped along y axis

T_len = ak.count(X_List_T,axis=0) #total number of events in Truth
Y_len = ak.count(X_List_Y,axis=0) #total number of events in method
T_len = ak.num(X_List_T,axis=0) #total number of events in Truth
Y_len = ak.num(X_List_Y,axis=0) #total number of events in method

if T_len > Y_len: #if total number of events for Truth is greater
Y_boolean = ak.count(X_List_Y,axis=-1) >= 1 #boolean to filter ak.Arrays wrt single events in method
Expand Down

0 comments on commit 57ca12e

Please sign in to comment.