fix(HillasIntersection): use geometry frame focal length for CameraFrame reconstruction - #3054
Open
STSpencer wants to merge 2 commits into
Open
Conversation
…quivalent When reconstructing from CameraHillasParametersContainer, the focal length used to build the CameraFrame for coordinate transforms must match the focal length with which the camera geometry (and thus the Hillas parametrization) was defined. Previously, HillasIntersection hardcoded optics.equivalent_focal_length, which diverges from the effective focal length selected at data read time (SimTelEventSource.focal_length_choice defaults to FocalLengthKind.EFFECTIVE). Using the wrong focal length introduces a plate-scale error that grows with the distance of the image from the camera centre. High-energy showers produce large, off-axis images far from the centre, so they suffer the largest directional bias—degrading angular resolution precisely at high energies. Fix: read camera.geometry.frame.focal_length, consistent with HillasReconstructor and with the frame used for parametrization. Refs: cta-observatory#3051
Member
|
That is definitely a bug! I suspect that is one of the reasons why |
kosack
requested changes
Jul 22, 2026
maxnoe
approved these changes
Aug 3, 2026
maxnoe
marked this pull request as ready for review
August 3, 2026 10:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HillasIntersection._predictbuilds aCameraFramefor coordinate transforms using the telescope'sequivalent_focal_lengthwhen processingCameraHillasParametersContainerinput. However, the camera geometry — and therefore the Hillas parametrisation itself — is defined with the focal length chosen at read time (SimTelEventSource.focal_length_choice, which defaults toFocalLengthKind.EFFECTIVE). The effective and equivalent focal lengths differ by ~4–5% for typical CTA telescopes (e.g. LST: ~29.3 m effective vs 28 m equivalent).Because the reconstructed angular position is proportional to
camera_position / focal_length, using the wrong value introduces a plate-scale error. This error grows with the distance of the image from the camera centre. High-energy showers produce large, off-axis images far from the centre, so they are disproportionately affected — degrading angular resolution exactly at high energies.The sibling reconstructor
HillasReconstructoralready handles this correctly by readingcamera.geometry.frame.focal_length.Change
This reads back the focal length that was actually used when building the camera geometry frame, regardless of which
focal_length_choicewas configured — makingHillasIntersectionconsistent withHillasReconstructorand with the parametrisation frame.Notes
CameraHillasParametersContainer(i.e.ImageProcessor.use_telescope_frame=False). The default telescope-frame path is unaffected as it operates directly in angular coordinates.ruff format --checkandruff checkpass clean on the changed file.