From b7946e2e37a3034e67c16298c1b5a61f4136028e Mon Sep 17 00:00:00 2001 From: Jan Kieseler Date: Mon, 7 Oct 2024 15:21:20 +0200 Subject: [PATCH] assert not needed anymore with clearly defined seeds --- bind/G4Calo.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bind/G4Calo.py b/bind/G4Calo.py index 4174fa1..afafd23 100644 --- a/bind/G4Calo.py +++ b/bind/G4Calo.py @@ -182,6 +182,7 @@ def run_batch( splits the batch in jobs depending on how many cores are available and runs mini batches in parallel ''' assert nEvents > 0 + assert minEnergy_GeV > 0 nCores = multiprocessing.cpu_count() #make sure to adjust cores such that at least 80 events are run per core @@ -222,12 +223,6 @@ def run_batch( print('simulation finished') alldf = pd.concat(dfs) alldf.reset_index(drop=True, inplace=True) - #convert alldf['total_dep_energy'] to numpy array and check if all non-zero entries are unique - non_zero = alldf['total_dep_energy'][alldf['total_dep_energy'] != 0.] - n_unique = np.unique(non_zero.to_numpy()).shape[0] - n_ex_non_zero = non_zero.shape[0] - - assert (n_ex_non_zero==n_unique), f"only {n_unique} unique non-zero entries in total_dep_energy out of {n_ex_non_zero}" if len(filename): alldf.to_pickle(filename)