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

Fix h_max definition #2403

Merged
merged 14 commits into from
Oct 23, 2023
Prev Previous commit
Next Next commit
remove one more redundant check for reference loc
kosack committed Oct 23, 2023
commit 755eeed695213a5d9c8797e2aa816ebca9a709a9
23 changes: 10 additions & 13 deletions ctapipe/reco/hillas_intersection.py
Original file line number Diff line number Diff line change
@@ -261,19 +261,16 @@ def _predict(self, hillas_dict, array_pointing, telescopes_pointings=None):
tilt = SkyCoord(x=core_x * u.m, y=core_y * u.m, z=0 * u.m, frame=tilted_frame)
grd = project_to_ground(tilt)

if self.subarray.reference_location is not None:
h_max = self.reconstruct_h_max(
nom.fov_lon,
nom.fov_lat,
tilt.x,
tilt.y,
hillas_dict_mod,
tel_x,
tel_y,
90 * u.deg - array_pointing.alt,
)
else:
h_max = u.Quantity(np.nan, u.m)
h_max = self.reconstruct_h_max(
nom.fov_lon,
nom.fov_lat,
tilt.x,
tilt.y,
hillas_dict_mod,
tel_x,
tel_y,
90 * u.deg - array_pointing.alt,
)

src_error = np.sqrt(err_fov_lon**2 + err_fov_lat**2)