cta-observatory / ctapipe

Low-level data processing pipeline software for CTAO or similar arrays of Imaging Atmospheric Cherenkov Telescopes
https://ctapipe.readthedocs.org
BSD 3-Clause "New" or "Revised" License
63 stars 267 forks source link

Missing test coverage for ImPACT #901

Open maxnoe opened 5 years ago

maxnoe commented 5 years ago

While refactoring the coordinates, I came across large parts of the ImPACT code that are not unit tested, as I changed things ImPACT was using but no tests failed.

thomasgas commented 5 years ago

if i remember correctly some tests needs the templates to be tested. but maybe @ParsonsRD can comment on this.

ParsonsRD commented 5 years ago

Yes we need to implement a test which basically runs through the full reconstruction, this is difficult with out including a template set in the ctapipe package though...

thomasgas commented 5 years ago

maybe we could just have one small template (or a few) produced at a certain energy and a small MC file to test it against (at the same energy). We could test the reconstruction just at different energies (100 GeV and 1 TeV) in order to limit the size of the template and the tests for ImPACT. Make sense? A "monochromatic MC file" might be useful also in other cases.

maxnoe commented 5 years ago

The test files can be pretty crappy to just test if the code works. For physics performance we anyway need a lot of data.

ParsonsRD commented 5 years ago

One think we could do is to just create a dummy template class that returns only zeros and use that. It would at least show the the likelihood calculation is working properly etc. I think performing a full fit is a bit beyond the scope of the tests.

kosack commented 5 years ago

I think the idea of a very simplistic template (something small we can include in the test suite - with very wide binning, and a dummy model like a gaussian), or as @ParsonsRD said, a class the emulates one might be fine for most tests.

maxnoe commented 3 years ago

We need a Tool that can actually create the template file and then we can test it's application as well. A fixed set of template files is not enough.