Skip to content

Commit

Permalink
small fix and docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
StFroese committed Nov 15, 2022
1 parent 5d1478b commit fdd14a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ctapipe/coordinates/ground_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions ctapipe/coordinates/tests/test_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit fdd14a6

Please sign in to comment.