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

Use the impact distance calculation from ctapipe. #209

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
Next Next commit
Use variable for the name of the reconstructor.
  • Loading branch information
aleberti committed Feb 23, 2024
commit 6cc74c57321ea7f4128d8c2b36591bba100a3da2
6 changes: 4 additions & 2 deletions magicctapipe/scripts/lst1_magic/lst1_magic_stereo_reco.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ def stereo_reconstruction(input_file, output_dir, config, magic_only_analysis=Fa
)
continue

stereo_params = event.dl2.stereo.geometry["HillasReconstructor"]
reconstructor_name = "HillasReconstructor"

stereo_params = event.dl2.stereo.geometry[reconstructor_name]

if not stereo_params.is_valid:
logger.info(
Expand All @@ -340,7 +342,7 @@ def stereo_reconstruction(input_file, output_dir, config, magic_only_analysis=Fa
"core_x": stereo_params.core_x.to_value("m"),
"core_y": stereo_params.core_y.to_value("m"),
"impact": event.dl2.tel[tel_id]
.impact["HillasReconstructor"]
.impact[reconstructor_name]
.distance.to_value("m"),
"h_max": stereo_params.h_max.to_value("m"),
"is_valid": int(stereo_params.is_valid),
Expand Down
Loading