Skip to content

Commit 09dd230

Browse files
author
Ruo-yu Shang
committed
modified calculation
1 parent c035566 commit 09dd230

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ctapipe/image/hillas.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,8 @@ def hillas_parameters(geom, image):
165165
psi_uncert = np.sqrt(lsq_cov[0, 0] + p[0] * p[0]) * (
166166
1.0 + pow(np.tan(width / length * np.pi / 2.0), 2)
167167
)
168-
transverse_cog_uncert = np.sqrt(
169-
lsq_cov[1, 1] * (1.0 + np.sin(p[0]) * np.sin(p[0]))
170-
)
168+
sin_p0 = np.sin(p[0])
169+
transverse_cog_uncert = np.sqrt(lsq_cov[1, 1] * (1.0 + sin_p0 * sin_p0))
171170

172171
# Compute of the Hillas parameters uncertainties.
173172
# Implementation described in [hillas_uncertainties]_ This is an internal MAGIC document

0 commit comments

Comments
 (0)