Skip to content

Commit

Permalink
remove transformation because geom already in camera frame
Browse files Browse the repository at this point in the history
  • Loading branch information
TjarkMiener committed Feb 26, 2025
1 parent 2708776 commit 5a42e7b
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions ctlearn/tools/predict_LST1.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,6 @@ class LST1PredictionTool(Tool):
),
).tag(config=True)

transform_to_CameraFrame = Bool(
default_value=True,
allow_none=False,
help=(
"Transform the camera geometry to the CameraFrame. "
"Needed if training was done in this frame."
),
).tag(config=True)

output_path = Path(
default_value="./output.dl2.h5",
allow_none=False,
Expand Down Expand Up @@ -629,7 +620,7 @@ def start(self):
)
if self.load_cameradirection_model_from is not None:
direction_table = example_identifiers.copy()
# Set the telescope pointing of the SkyOffsetSeparation tranform to the fix pointing
# Set the telescope position
tel_ground_frame = self.subarray.tel_coords[
self.subarray.tel_ids_to_indices(self.tel_id)
]
Expand Down Expand Up @@ -784,16 +775,10 @@ def _create_subarray(self, tel_id=1, reference_location=None):
pix_area=u.Quantity(cam_geom_table.cols.pix_area[:], u.cm**2),
pix_rotation=Angle(100.893, u.deg),
cam_rotation=Angle(0, u.deg),
frame = EngineeringCameraFrame(focal_length=ctapipe_io_lst.OPTICS.effective_focal_length),
frame = CameraFrame(focal_length=ctapipe_io_lst.OPTICS.effective_focal_length),
)
# Needs to be renamed because the ImageMapper smooths the pixel positions
# Needs to be renamed because the ImageMapper smooths the pixel positions
camera_geom.name = "RealLSTCam"
if self.transform_to_CameraFrame:
camera_geom = camera_geom.transform_to(
CameraFrame(
focal_length=ctapipe_io_lst.OPTICS.effective_focal_length
)
)
# get info on the camera readout:
(
daq_time_per_sample,
Expand Down

0 comments on commit 5a42e7b

Please sign in to comment.