Skip to content

Commit

Permalink
Changed image searching and obs_id and event_id saving
Browse files Browse the repository at this point in the history
  • Loading branch information
nzywucka committed Sep 11, 2024
1 parent ca78fb3 commit f9dca14
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions magicctapipe/scripts/lst1_magic/lst_m1_m2_cloud_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,18 @@ def process_telescope_data(input_file, config, tel_id, camgeom, focal_eff):
for index in inds:
event_id_lst = dl1_params["event_id_lst"][index]
obs_id_lst = dl1_params["obs_id_lst"][index]
event_id = dl1_params["event_id_magic"][index]
obs_id = dl1_params["obs_id_magic"][index]
event_id = dl1_params["event_id"][index]
obs_id = dl1_params["obs_id"][index]
event_id_magic = dl1_params["event_id_magic"][index]
obs_id_magic = dl1_params["obs_id_magic"][index]
timestamp = dl1_params["timestamp"][index]
multiplicity = dl1_params["multiplicity"][index]
combo_type = dl1_params["combo_type"][index]

if assigned_tel_ids["LST-1"] == tel_id:
event_id, obs_id = event_id_lst, obs_id_lst
event_id_image, obs_id_image = event_id_lst, obs_id_lst
else:
event_id_image, obs_id_image = event_id_magic, obs_id_magic

pointing_az = dl1_params["pointing_az"][index]
pointing_alt = dl1_params["pointing_alt"][index]
Expand Down Expand Up @@ -221,9 +223,9 @@ def process_telescope_data(input_file, config, tel_id, camgeom, focal_eff):
trans_pixels = transl[ilayer]

inds_img = np.where(
(dl1_images["event_id"] == event_id)
(dl1_images["event_id"] == event_id_image)
& (dl1_images["tel_id"] == tel_id)
& (dl1_images["obs_id"] == obs_id)
& (dl1_images["obs_id"] == obs_id_image)
)[0]

if len(inds_img) == 0:
Expand Down

0 comments on commit f9dca14

Please sign in to comment.