-
Notifications
You must be signed in to change notification settings - Fork 77
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
Interpolation of RF predictions with cosZD, for homogeneous performance #1320
base: main
Are you sure you want to change the base?
Conversation
to avoid jumps when using RFs trained on a discrete set of pointings
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1320 +/- ##
==========================================
- Coverage 73.52% 73.27% -0.25%
==========================================
Files 134 134
Lines 14215 14321 +106
==========================================
+ Hits 10451 10494 +43
- Misses 3764 3827 +63 ☔ View full report in Codecov by Sentry. |
command-line options The interpolation can be switched on for the three reconstructions independently (energy, gammaness, direction) By default the correction is applied. If no MC DL1 training directory is provided, the path will be built from the path of the RF models. If directory does not exist the option is simply deactivated
Hi @moralejo |
Will do. What is better, just the zenith and azimuth values, or a list of the directory names? |
I think the table of values that you can use directly at inference would be great (with appropriate metadata such as the date of export). |
Can you clarify exactly what metadata (and how? Just lines starting with # or whatever?) |
What if we just write in the config the two arrays of zeniths and azimuths? I did not implement it yet, it would be like this: "random_forest_zd_interpolation": {
} |
Instead of closest angular distance we now take the closest nodes in alt_tel on the same side of the culmination (same sign of sin_az_tel)
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.
Copilot reviewed 2 out of 3 changed files in this pull request and generated no suggestions.
Files not reviewed (1)
- lstchain/data/lstchain_standard_config.json: Language not supported
Comments skipped due to low confidence (1)
lstchain/reco/dl1_to_dl2.py:215
- The word 'dictionnary' is misspelled. It should be 'dictionary'.
config: dictionnary containing configuration
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.
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
Files not reviewed (1)
- lstchain/data/lstchain_standard_config.json: Language not supported
Comments suppressed due to low confidence (1)
lstchain/scripts/lstchain_dl1_to_dl2.py:164
- Ensure that the
training_pointings
array is correctly populated and used. If the directory does not exist, the interpolation should be switched off.
if dl1_training_dir.is_dir():
This should solve the issue of RF "performance jumps" at high zenith angles, when the pointing goes through the middle points between training nodes. See #1317
NOTE: this is a different implementation of the interpolation approach proposed by @gabemery, see branch https://github.com/cta-observatory/cta-lstchain/tree/dl2_RF_interpolate)
If the interpolation option is activated we call the RF predictors twice, for each of the two closest MC training nodes, then interpolate (or extrapolate) the values to the actual telescope pointing for each event.
Currently the training sample pointings are obtained from the path to the training sample(provided via config file). A better solution would be to add to the .sav files an array with the zenith and azimuth values of the MC training nodes.