Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add HAWC 2HWC catalog #1108
I was geared to the existing files for e.g. gamma cat, fermi and hess.
@pdeiml - This is on a good way, welcome to Gammapy and thanks for the contribution!
I left a bunch of inline comments. Please address them and add the spectral and morphology model properties and test for those, and more questions if you have them, then ping me for a second review.
The code that's there now looks good.
@pdeiml - A major point of having these classes in Gammapy at all is that they translate the source parameter infos to Gammapy source models. Do you have time to add this via a
morphology_model property and corresponding tests (again following other catalogs as example)? (If no, then I would just add it by adding a commit to your PR in the coming days)
I can add a spectral_model function. That is not difficult.
What should be written in the morphology method?
For the spectra, I see a few options how to expose it, and don't have a preference on API yet (but might later after using it for a while), choose the one you prefer.
Either a function with a parameter to select, or two separate properties. I guess returnning a length 1 or 2 list with 1 or 2 spectral models is also fine.
I thought they measured source extensions. But looking at the paper I see that they didn't really. So forget about the morphology model, the info doesn't exist.
Running pep8 on hawc.py still returns:
gammapy/catalog/hawc.py:78:13: E128 continuation line under-indented for visual indent
which is because of the line break in these two lines.
Aug 31, 2017
Docs for this are now online: http://docs.gammapy.org/en/latest/api/gammapy.catalog.SourceCatalog2HWC.html