Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement DataStoreMaker for IACT DL3 indexing #2154
This PR adds a
The use case (see docstring and test) is to make it possible to analyse IACT DL3 data if you don't have HDU&OBS index files, or to create HDU&OBS index files with Gammapy.
There are different formats in use how EVENTS and IRFs are linked, we probably want to support a few.
This initial version is supposed to work for data from CTA 1DC or from ctobssim, for the cases where CALDB is used to link to the IRFs. This was a feature request by @debaice , and pair-coded, to be able to analyse ctobssim output with Gammapy.
I also would like to address #1255 here to allow
For this case now where one makes a
adonath left a comment
My general comment would be to maybe try to simplify a little bit the code structure. I found the class solution with yield statements and caching overly complex. I think creating hdu and obs tables does not have to be super efficient for now, because it's typically done once and then the index tables are written to disk. If you have a few >1000 event files and it takes a few minutes to run is just fine. I guess a simple flat hierarchy helper method would do as well...but as the code is already written maybe just leave as is.
@debaice tested with a
I'll create a test case in