-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix transform of CameraGeometry #2279
base: main
Are you sure you want to change the base?
Conversation
- Allow a Frame class to be passed so attributes are retained
TelescopeFrame will still lose the info, but I guess that is fundamentally because it doesn't contain that attribute. sub = SubarrayDescription.read("dataset://gamma_prod5.simtel.zst")
geom = sub.tel[100].camera.geometry
print(geom.frame)
print(geom.transform_to(EngineeringCameraFrame).frame)
print(geom.transform_to(TelescopeFrame).frame)
However, if the original CameraFrame has an |
from the Astropy docs:
|
as mentioned in the issue, I think I will modify this to store the pix_x, pix_y coordines internally in a SkyCoord, rather than constructing a SkyCoord during transform. That will allow all frame attributes to be propegated, even ones not explicitly in the target frame. That means one will be able to transform from CameraFrame to TelescopeFrame and back again without re-defining the parameters. |
Allow a Frame class to be passed so attributes are retained
Fixes #2277
The following now works:
Note that the focal length and other parameters are retained in the transform