Open
Description
Describe the bug
Transforming a CameraGeometry that has a focal_length
attribute to EngineeringCameraFrame
resets that frame attribute.
To Reproduce
from ctapipe.instrument import SubarrayDescription
from ctapipe.coordinates import EngineeringCameraFrame
subarray = SubarrayDescription.read("dataset://gamma_prod5.simtel.zst")
geom = subarray.tel[100].camera.geometry
print("OLD", geom.frame)
new_geom = geom.transform_to(EngineeringCameraFrame())
print("NEW", new_geom.frame)
OLD <CameraFrame Frame (focal_length=16.445049285888672 m, rotation=0.0 rad, telescope_pointing=None, obstime=None, location=None)>
NEW <EngineeringCameraFrame Frame (focal_length=0.0 m, rotation=0.0 rad, telescope_pointing=None, obstime=None, location=None, n_mirrors=1)>
Expected behavior
Frame attributes are retained, so further transforms (like back to TelescopeFrame) work