Skip to content

Commit

Permalink
Bug fix: not affecting MR5 as the beam sim set to write out at each e…
Browse files Browse the repository at this point in the history
…vent
  • Loading branch information
Yifan Chen committed Mar 11, 2024
1 parent b3ee568 commit 70d3391
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/simulate_pixels.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ def save_results(event_times, is_first_batch, results, i_trig, i_mod=-1, light_o
elif len(results_acc['light_event_id']) > 0 and len(np.concatenate(results_acc['light_event_id'], axis=0)) > 0:
is_first_batch = save_results(event_times, is_first_batch, results_acc, i_trig, i_mod, light_only=True)
i_trig += 1 # add to the trigger counter
results_acc = defaultdict(list)
results_acc = defaultdict(list) # reinitialize after each save_results

logger.take_snapshot([len(logger.log)])
RangePop() # run_simulation
Expand All @@ -1077,6 +1077,7 @@ def save_results(event_times, is_first_batch, results, i_trig, i_mod=-1, light_o
elif len(results_acc['light_event_id']) > 0 and len(np.concatenate(results_acc['light_event_id'], axis=0)) > 0:
is_first_batch = save_results(event_times, is_first_batch, results_acc, i_trig, i_mod, light_only=True)
i_trig += 1 # add to the trigger counter
results_acc = defaultdict(list) # reinitialize after each save_results
RangePop()

logger.take_snapshot([len(logger.log)])
Expand Down

0 comments on commit 70d3391

Please sign in to comment.