-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,18 +76,22 @@ def predict(self, hillas_parameters, tel_x, tel_y, array_direction): | |
src_x, src_y, err_x, err_y = self.reconstruct_nominal(hillas_parameters) | ||
core_x, core_y, core_err_x, core_err_y = self.reconstruct_tilted( | ||
hillas_parameters, tel_x, tel_y) | ||
err_x *= u.rad | ||
err_y *= u.rad | ||
err_x *= u.deg | ||
err_y *= u.deg | ||
|
||
nom = SkyCoord( | ||
x=src_x * u.rad, | ||
y=src_y * u.rad, | ||
frame=NominalFrame(array_direction=array_direction) | ||
sky_pos = SkyCoord( | ||
az=src_x * u.deg, | ||
alt=src_y * u.deg, | ||
frame=HorizonFrame() | ||
) | ||
horiz = nom.transform_to(HorizonFrame()) | ||
|
||
nom_frame = NominalFrame(origin=array_direction) | ||
|
||
nom = sky_pos.transform_to(nom_frame) | ||
|
||
result = ReconstructedShowerContainer() | ||
result.alt, result.az = horiz.alt, horiz.az | ||
result.alt = nom.altaz.alt # src_y * u.deg | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
thomasgas
|
||
result.az = nom.altaz.az # src_x * u.deg | ||
|
||
tilt = SkyCoord( | ||
x=core_x * u.m, | ||
|
@@ -99,7 +103,7 @@ def predict(self, hillas_parameters, tel_x, tel_y, array_direction): | |
result.core_y = grd.y | ||
|
||
x_max = self.reconstruct_xmax( | ||
nom.x, nom.y, | ||
nom.altaz.az, nom.altaz.alt, | ||
tilt.x, tilt.y, | ||
hillas_parameters, | ||
tel_x, tel_y, | ||
|
@@ -135,7 +139,7 @@ def reconstruct_nominal(self, hillas_parameters, weighting="Konrad"): | |
Returns | ||
------- | ||
Reconstructed event position in the nominal system | ||
Reconstructed event position in the horizon system | ||
""" | ||
if len(hillas_parameters) < 2: | ||
|
@@ -185,8 +189,6 @@ def reconstruct_nominal(self, hillas_parameters, weighting="Konrad"): | |
var_x = np.average((sx - x_pos) ** 2, weights=weight) | ||
var_y = np.average((sy - y_pos) ** 2, weights=weight) | ||
|
||
# Copy into nominal coordinate | ||
|
||
return x_pos, y_pos, np.sqrt(var_x), np.sqrt(var_y) | ||
|
||
def reconstruct_tilted(self, hillas_parameters, tel_x, tel_y, | ||
|
What is nom.altaz?