Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed image searching and obs_id and event_id saving #257

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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