Skip to content

Commit

Permalink
use pre-offset search in automatic script
Browse files Browse the repository at this point in the history
  • Loading branch information
Elisa-Visentin committed Sep 27, 2023
1 parent ef7822b commit 31aa48c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions magicctapipe/scripts/lst1_magic/coincident_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def configfile_coincidence(ids, target_dir):
f = open(target_dir+'/config_coincidence.yaml','w')
f.write("mc_tel_ids:\n LST-1: "+str(ids[0])+"\n LST-2: "+str(ids[1])+"\n LST-3: "+str(ids[2])+"\n LST-4: "+str(ids[3])+"\n MAGIC-I: "+str(ids[4])+"\n MAGIC-II: "+str(ids[5])+"\n\n")
f.write('event_coincidence:\n timestamp_type_lst: "dragon_time" # select "dragon_time", "tib_time" or "ucts_time"\n window_half_width: "300 ns"\n')
f.write(' pre_offset_search: true\n')
f.write(' n_pre_offset_search_events: 100\n')
f.write(' time_offset:\n start: "-10 us"\n stop: "0 us"\n')
f.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def event_coincidence(input_file_lst, input_dir_magic, output_dir, config):
window_half_width = u.Quantity(window_half_width).to("ns")
window_half_width = u.Quantity(window_half_width.round(), dtype=int)
pre_offset_search = False
if "pre_offset_search" in config_coinc:
pre_offset_search = config_coinc["pre_offset_search"]
if "pre_offset_search" in config_coinc: #looking for the boolean value of pre_offset_search in the configuration file
pre_offset_search = config_coinc["pre_offset_search"]

if pre_offset_search:
logger.info("\nPre offset search will be performed.")
Expand Down

0 comments on commit 31aa48c

Please sign in to comment.