diff --git a/ctapipe/coordinates/ground_frames.py b/ctapipe/coordinates/ground_frames.py index c1c83b2e708..079267f4c0c 100644 --- a/ctapipe/coordinates/ground_frames.py +++ b/ctapipe/coordinates/ground_frames.py @@ -98,10 +98,10 @@ def _get_shower_trans_matrix(azimuth, altitude, inverse=False): Parameters ---------- - azimuth: u.Quantity[angle] + azimuth: float or ndarray Azimuth angle in radians of the tilted system used - zenith: u.Quantity[angle] - Zenith angle in radiuan of the tilted system used + altitude: float or ndarray + Altitude angle in radiuan of the tilted system used Returns ------- @@ -232,7 +232,7 @@ def project_to_ground(tilt_system): trans = _get_shower_trans_matrix( tilt_system.pointing_direction.az.to_value(u.rad), - np.pi / 2 - tilt_system.pointing_direction.alt.to_value(u.rad), + tilt_system.pointing_direction.alt.to_value(u.rad), ) x_projected = x_initial - trans[2][0] * z_initial / trans[2][2] diff --git a/ctapipe/coordinates/tests/test_coordinates.py b/ctapipe/coordinates/tests/test_coordinates.py index 97cb00d14c9..1c93e70e274 100644 --- a/ctapipe/coordinates/tests/test_coordinates.py +++ b/ctapipe/coordinates/tests/test_coordinates.py @@ -249,7 +249,7 @@ def test_ground_to_tilt_many_to_many(): TiltedGroundFrame(pointing_direction=pointing_direction) ) - assert tilted.shape == (2,3) + assert tilted.shape == (2, 3) def test_camera_missing_focal_length(): @@ -300,7 +300,7 @@ def test_ground_to_tilt_many_to_many_roundtrip(): tilted = ground[:, np.newaxis].transform_to( TiltedGroundFrame(pointing_direction=pointing_direction) ) - back = tilted[:,0].transform_to(GroundFrame()) + back = tilted[:, 0].transform_to(GroundFrame()) assert u.isclose(ground.x, back.x, atol=1e-12 * u.m).all() assert u.isclose(ground.y, back.y, atol=1e-12 * u.m).all()