-
Notifications
You must be signed in to change notification settings - Fork 9
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 the impact distance calculation from ctapipe. #209
base: master
Are you sure you want to change the base?
Conversation
As a cross-check, find attached the (real data) stereo files from the tests created with the current version from the master and the version from this branch. The calculated impact distances are consistent: In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: df_orig = pd.read_hdf("dl1_stereo_MAGIC_LST-1.Run15337.0002_original.h5", key="events/parameters")
In [4]: df_new = pd.read_hdf("dl1_stereo_MAGIC_LST-1.Run15337.0002.h5", key="events/parameters")
In [5]: impact_orig = np.array(df_orig["impact"])
In [6]: impact_new = np.array(df_new["impact"])
In [7]: np.allclose(impact_new, impact_orig, equal_nan=True)
Out[7]: True |
@jsitarek can you quickly review this PR? It is here since a long time |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #209 +/- ##
=======================================
Coverage 77.23% 77.23%
=======================================
Files 21 21
Lines 2614 2614
=======================================
Hits 2019 2019
Misses 595 595 ☔ View full report in Codecov by Sentry. |
Until now, we were using a function internal to MCP to calculate the impact distance. Since ctapipe provides it and it is calculated when calling the
HillasReconstructor
, it makes sense to use that.