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

Script to apply cloud affection correction to the LST, Magic 1, and M… #241

Merged
merged 15 commits into from
Sep 11, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Change of way of calculating parameters from the images.
  • Loading branch information
nzywucka committed Sep 11, 2024
commit ca78fb34b62d5b2cf7183fe160f746d6b710f36d
17 changes: 8 additions & 9 deletions magicctapipe/scripts/lst1_magic/lst_m1_m2_cloud_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,21 @@ def process_telescope_data(input_file, config, tel_id, camgeom, focal_eff):
peak_time = dl1_images["peak_time"][index_img]
image /= trans_pixels
corr_image = image.copy()
corr_image[~cleanmask] = 0

hillas_params = hillas_parameters(camgeom, corr_image)
clean_image = corr_image[cleanmask]
clean_camgeom = camgeom[cleanmask]

hillas_params = hillas_parameters(clean_camgeom, clean_image)
timing_params = timing_parameters(
camgeom[cleanmask],
corr_image[cleanmask],
peak_time[cleanmask],
hillas_params,
clean_camgeom, clean_image, peak_time[cleanmask], hillas_params
)
leakage_params = leakage_parameters(camgeom, corr_image, cleanmask)
if assigned_tel_ids["LST-1"] == tel_id:
jsitarek marked this conversation as resolved.
Show resolved Hide resolved
conc_params = concentration_parameters(
camgeom[cleanmask], image[cleanmask], hillas_params
)
clean_camgeom, clean_image, hillas_params
) # "For LST-1 we compute concentration from the cleaned image and for MAGIC from the full image to reproduce the current behaviour in the standard code
else:
conc_params = concentration_parameters(camgeom, image, hillas_params)
conc_params = concentration_parameters(camgeom, corr_image, hillas_params)

event_params = {
**hillas_params,
Expand Down