Skip to content
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

Wrong Camera Coordinate Frame in LST Camera defintion #138

Closed
maxnoe opened this issue Jun 6, 2019 · 6 comments
Closed

Wrong Camera Coordinate Frame in LST Camera defintion #138

maxnoe opened this issue Jun 6, 2019 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@maxnoe
Copy link
Member

maxnoe commented Jun 6, 2019

As discussed with @FrancaCassol and @rlopezcoto in Lugano,
the file LSTCam-002.camgeom.fits.gz in ctapipe-extra
has the pixel coordinates in the wrong cordinate frame.
The coordinates are in MAGIC/FACT/EngineeringFrame not in the
HESS/sim_telarray/ctapipe frame.

ctapipe at the moment requires that the pixel coordinates are given in the sim_telarray frame, otherwise coordinate transformations will not work.

lstcams

from ctapipe.instrument import CameraGeometry
from ctapipe.visualization import CameraDisplay
import matplotlib.pyplot as plt
import numpy as np

fig, axs = plt.subplots(1, 2, constrained_layout=True, figsize=(6, 3))

d1 = CameraDisplay(CameraGeometry.from_name('LSTCam', version=2), ax=axs[0])
d2 = CameraDisplay(CameraGeometry.from_name('LSTCam'), ax=axs[1])
d1.image = np.arange(1855)
d2.image = np.arange(1855)


fig.savefig('lstcams.png', dpi=300)
@maxnoe
Copy link
Member Author

maxnoe commented Jun 6, 2019

@maxnoe
Copy link
Member Author

maxnoe commented Jun 6, 2019

I opened a PR here: cta-observatory/ctapipe#1085

If that is merged, you could do:

cam = CameraGeometry.from_name('LSTCam', version=2)
cam.frame = EngineeringCameraFrame()
cam = cam.transform_to(CameraFrame())

To get the camera geometry in the correct coordinate system.

@rlopezcoto
Copy link
Contributor

Great @maxnoe, thanks!
Since we are not in a very big hurry because we are still not taking data in which we use the pointing information, I think by now we will wait to see if the PR gets merged, otherwise we can consider other actions

@maxnoe
Copy link
Member Author

maxnoe commented Jun 6, 2019

I would suggest to fix the file as well. So x → -y, y → -x, and cam and pix rotation → 90° - rotation

@maxnoe
Copy link
Member Author

maxnoe commented Jun 17, 2019

cta-observatory/ctapipe#1085 is merged now, the EngineeringCameraFrame is available and can be used for plotting. However, the geometry files needs to have coordinates given in the CameraFrame, so this should be updated

@rlopezcoto rlopezcoto added bug Something isn't working help wanted Extra attention is needed labels Oct 17, 2019
@rlopezcoto
Copy link
Contributor

This was solved with this ctapipe-extra PR and we later moved them to ctapipe_io_lst:
cta-observatory/ctapipe_io_lst#19
cta-observatory/ctapipe_io_lst#20
cta-observatory/ctapipe_io_lst#23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants