-
Notifications
You must be signed in to change notification settings - Fork 265
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
New 3D shower model #1996
base: main
Are you sure you want to change the base?
New 3D shower model #1996
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1996 +/- ##
=======================================
Coverage ? 92.77%
=======================================
Files ? 220
Lines ? 18167
Branches ? 0
=======================================
Hits ? 16855
Misses ? 1312
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Appendix to be found where? |
@vuillaut Sry, I meant the appendix of the paper, p.29 |
Ha yes thanks ! |
If reminds me of a forgotten package 😄 |
I remember remarking once when you presented Pschitt that it could be used for reconstruction! All you need to do is add a likelihood function and minimize it |
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.
Nice work! This is progressing fast. I will try to do a more thorough review later, but for now here are just a few minor comments...
I changed the parameter names to more recognizable ones as recommended by Karl. The |
We also need to add an energy estimator to the model since we only get the number of photons. The paper recommends obtaining a relation from simulations based on number of photons, the telescope multiplicity, the telescope pointing and the direction of the shower axis. If I understand them correctly they interpolate their data to get a relation I think another approach would be to use the EnergyRegressor with the number of photons given as a feature, but I'm not sure. What do you think @kosack @maxnoe ? |
It think using an EnergyRegressor is a better idea than using a lookup table as they do. It makes it the same sort of training as for other reconstructions, and we avoid the usual problems with binning and edge cases. |
If we'd really want to use a lookup table, my approach would be to implement one as a custom scikit learn regressor and then we can use the machine learning module structure the same way. |
This reminds me that we might want to also think about merging the ImPACT models and training with the ML module eventually - they are basically the same thing: a model that predicts an image, and should be trainable using the same mechanism. I'll open an issue to remind us |
There are some open questions/tasks I think:
(additional: |
I discussed this yesterday with Karl and we came to the conclusion that, no, this does not predict energy. Rather you'd use the number of photons this reconstructor produces as input feature for the machine learning |
ok great, but this leaves the question where to store this number. The |
Test now takes ~8s instead of 6min |
There are conflicts that need to be resolved, please rebase / merge the current main |
This is just a draft for now to review some ideas.
This approach is based on this paper.
The shower is basically a 3D Gaussian distribution with a width $\sigma_t $ and length$\sigma_l$ .
The orientation is given by the azimuthal and polar angle. Those are used to rotate the covariance matrix.
The barycentre of the shower is calculated using the height of the first interaction in the atmosphere and the length of the shower. The centre is shifted according to the intersection of the shower axis on ground.
The next step is to write an
ImagePredictor
class which will take a subarray, goes through each telescope and integrates the 3D distribution as it can be seen for each pixel in the camera. This could be done with scipy'stplquad
but this is computationally very expensive. A better solution is to use the analytical solution provided by the paper (see Appendix).