-
Notifications
You must be signed in to change notification settings - Fork 270
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
Refactor instrument module #982
Conversation
Btw, I was curious if one can find the telescope names somewhere in the eventio file, so that guessing (even of the name) could potentially avoided completely. It found them in the "History" part, I think, but only in comments looking like this:
I guess this is not a good way to read the telescope name from the file, but I wanted to mention it anyway. |
The tests now failing are due to testing for magic numbers in the old simtel file. Any advice on how to replace those values? |
If we find no other way to check for correct values then these tests can be removed imo. |
I know that I had mentioned that it would be nice to have the names to Konrad, and I think he said he would add that in a future version. It may be there already somewhere. In any case, we still probably want to map names there to "standard" ones we define, so there is no confusion. |
was the example file updated? If so, yes we should remove all tests that assume specific values. It's better to give the tests a hand-made dummy event where we know the correct outcome, rather than using a real event (which can be tested at a higher level if necessary). Probably that should be a separate PR. |
Maybe not necessary for this PR, but it would be nice to add a "guess" function for the SubarrayDescription itself, so that at least the Prod ID and the array layout could be shown (not sure if that is info directly in the MC headers or not). Right now all subarrays are called "MonteCarloArray", which is not so useful to identify them. |
I just produced small test files using the current developement version of simtel_array (prod4 baselines la palma and paranal) and I found no changes in the containers that describe the telescopes. |
Yes, I changed the |
I removed the magic number tests, test pass now. |
Codecov Report
@@ Coverage Diff @@
## master #982 +/- ##
==========================================
+ Coverage 78.19% 78.71% +0.52%
==========================================
Files 194 197 +3
Lines 11313 11334 +21
==========================================
+ Hits 8846 8922 +76
+ Misses 2467 2412 -55
Continue to review full report at Codecov.
|
Tests are passing, please review @watsonjj @kosack @dneise @ParsonsRD @mackaiver |
So the difference between the two test fles is the MC production? Prod2 vs Prod3? Maybe we should rename that test file to something conveying more information. |
Yes, but this would be fore ctapipe-extra. I can also produce more sensible test files not, I got a recent simtel running. |
Please review again, I added @watsonjj comment. |
It would be nice to have some smaller nicer test files and get rid of the old ones in ctapipe_extra which is becoming too large already: at least something like 10+ gamma rays for north and south configurations, and some muon-only files. For deeper/larger test files, we can just make them automatically download from the server, rather than put them in the package. In the future, we will move to selectable configurations as in #738, so this is just a temporary fix. |
Working on #971
TelescopeDescription
,OpticsDescription