diff --git a/ctapipe/reco/HillasReconstructor.py b/ctapipe/reco/HillasReconstructor.py index e339db4d03b..0a83d7bd630 100644 --- a/ctapipe/reco/HillasReconstructor.py +++ b/ctapipe/reco/HillasReconstructor.py @@ -313,7 +313,7 @@ def estimate_h_max(self): positions = [plane.pos for plane in self.hillas_planes.values()] # not sure if its better to return the length of the vector of the z component - return np.linalg.norm(line_line_intersection_3d(uvw_vectors, positions)) + return np.linalg.norm(line_line_intersection_3d(uvw_vectors, positions)) * u.m class HillasPlane: diff --git a/ctapipe/reco/tests/test_HillasReconstructor.py b/ctapipe/reco/tests/test_HillasReconstructor.py index 540856f3c82..f0d99d2318d 100644 --- a/ctapipe/reco/tests/test_HillasReconstructor.py +++ b/ctapipe/reco/tests/test_HillasReconstructor.py @@ -76,7 +76,7 @@ def test_h_max_results(): # the results should be close to the direction straight up - np.testing.assert_allclose(h_max_reco, 0, atol=1e-8) + np.testing.assert_allclose(h_max_reco.value, 0, atol=1e-8) # np.testing.assert_allclose(fitted_core_position.value, [0, 0], atol=1e-3)