-
Notifications
You must be signed in to change notification settings - Fork 272
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
Use Astropy Coordinate Transofmations For Reconstruction #758
Conversation
…d work on proper alt az angles
Just to be clear before reviewing it all - does this still do the reconstruction as 3D vectors, and not project all cameras onto a nominal plane? I would like to keep it in 3D, since the 2d-style reconstruction is far more complex and error prone and needs special attention for divergent pointing. If so, thanks for cleaning this up! It's good to start to merge toward consistent coordinate systems. |
Also, does it affect the speed much? I know using astropy coords is not fast, which is one reason I had considered dropping them altogether and just writing our own transforms, and only using them to go from alt/az to ra/dec at the end . |
Nothing has changed in the algorithms themselves. The transformation from camera coordinate to a eucledian (3D) direction vector was done by the |
It might be slower. I don't know. I'm sure we can optimize that. |
I agree astropy coords an units can add quite some overhead. But maybe we should profile that once we get the reconstruction working for all cases (divergent, point-like, diffuse, north, south) as well? |
Yes, please let's first focus on getting it correct. Astropy units help a lot with that. Once we verified it's working for all usecases, and only then, we should start optimizing this, potentially removing astropy coordinates and units completely. But: having it working and tested with astropy units / coordinates means that we can have reliable unit tests before we start removing those safety nets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and cleans up the code a lot! Please also update the examples and notebooks that use it - that will get the build working: It seems at least these two need small updates:
- examples/plot_theta_square.py
- examples/notebooks/Theta square plot.ipynb
Should we wait for #753 before this is ready to merge? or are they relatively independent? |
Should be independent. |
Codecov Report
@@ Coverage Diff @@
## master #758 +/- ##
==========================================
+ Coverage 69.49% 69.82% +0.33%
==========================================
Files 198 197 -1
Lines 10708 10648 -60
==========================================
- Hits 7441 7435 -6
+ Misses 3267 3213 -54
Continue to review full report at Codecov.
|
Ok this looks fine, other than a few unused imports, so I'll merge it shortly |
As the title says I refactored the HillasReconstructor to use the astropy coordinate transformations specified in
ctapipe.coordinates
. The algorithm did not change.This changes the interface of the
predict
method slightly. You now need to pass the alt, az of the telescope pointing. Before it was alt and(90 - alt), az
I think.I also deleted some methods that were unused in HillasReconstructor.