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

Compute and record shower's core position also in the TiltedFrame when using HillasReconstructor #1745

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c06412a
compute and ouput core position in the tilted frame
HealthyPear Jun 3, 2021
4d99404
add core position in the tilted frame to ReconstructedGeometryContainer
HealthyPear Jun 3, 2021
618e351
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Jun 4, 2021
f716cbb
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Jul 16, 2021
3b0371d
Improve Field name of new core uncertainty
HealthyPear Jul 22, 2021
3cd4bf0
Split reconstructed core uncertainty into X-Y components (GroundFrame)
HealthyPear Jul 23, 2021
c3aa3ba
Split reconstructed core uncertainty into X-Y components (TiltedFrame)
HealthyPear Jul 23, 2021
52e0ff0
Bump data model version
HealthyPear Jul 24, 2021
e2cf347
update DL1EventSource data model
HealthyPear Jul 24, 2021
f680b4a
update HillasIntersection reconstructor
HealthyPear Jul 24, 2021
ad0a984
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Jul 24, 2021
ea2a239
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Aug 23, 2021
953506b
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Aug 30, 2021
301cd5c
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Sep 21, 2021
4858380
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Sep 21, 2021
55ed93a
Ignore files produced by Visual Studio Code
HealthyPear Mar 15, 2022
ff4f0bc
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Mar 15, 2022
e3a8eda
fix codacy complaints
HealthyPear Mar 15, 2022
9cbdafa
Merge branch 'master' into feature-write_core_tilted_frame
HealthyPear Mar 15, 2022
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
21 changes: 19 additions & 2 deletions ctapipe/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,27 @@ class ReconstructedGeometryContainer(Container):
nan * u.m, "reconstructed x coordinate of the core position", unit=u.m
)
core_y = Field(
nan * u.m, "reconstructed y coordinate of the core position", unit=u.m
nan * u.m,
"reconstructed y coordinate of the core position",
unit=u.m
)
core_uncert = Field(
nan * u.m, "uncertainty of the reconstructed core position", unit=u.m
nan * u.m,
"uncertainty of the reconstructed core position in the ground frame",
unit=u.m
)
core_tilted_x = Field(
nan * u.m, "reconstructed x coordinate of the core position", unit=u.m
)
core_tilted_y = Field(
nan * u.m,
"reconstructed y coordinate of the core position",
unit=u.m
)
core_uncert_tilted = Field(
HealthyPear marked this conversation as resolved.
Show resolved Hide resolved
nan * u.m,
"uncertainty of the reconstructed core position in the tilted frame",
unit=u.m
)
h_max = Field(nan * u.m, "reconstructed height of the shower maximum", unit=u.m)
h_max_uncert = Field(nan * u.m, "uncertainty of h_max", unit=u.m)
Expand Down
12 changes: 7 additions & 5 deletions ctapipe/reco/hillas_reconstructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class are set to np.nan
direction, err_est_dir = self.estimate_direction(hillas_planes)

# array pointing is needed to define the tilted frame
core_pos = self.estimate_core_position(
core_pos_ground, core_pos_tilted = self.estimate_core_position(
event, hillas_dict, array_pointing, psi_core_dict, hillas_planes
)

Expand All @@ -292,8 +292,10 @@ class are set to np.nan
result = ReconstructedGeometryContainer(
alt=lat,
az=-lon,
core_x=core_pos[0],
core_y=core_pos[1],
core_x=core_pos_ground.x,
core_y=core_pos_ground.y,
core_tilted_x=core_pos_tilted.x,
core_tilted_y=core_pos_tilted.y,
tel_ids=[h for h in hillas_dict.keys()],
average_intensity=np.mean([h.intensity for h in hillas_dict.values()]),
is_valid=True,
Expand Down Expand Up @@ -519,9 +521,9 @@ def estimate_core_position(
x=core_position[0] * u.m, y=core_position[1] * u.m, frame=tilted_frame
)

core_pos = project_to_ground(core_pos_tilted)
core_pos_ground = project_to_ground(core_pos_tilted)

return core_pos.x, core_pos.y
return core_pos_ground, core_pos_tilted

def estimate_h_max(self, hillas_planes):
"""
Expand Down