assert not needed anymore with clearly defined seeds
This commit is contained in:
+1
-6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user