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
Development in gammapy.maps #1054
Conversation
@woodmd - I don't have time for a detailed review before going on vacation. Here's my suggestions based on a quick look: Locally with
I see this fail (because you're passing
Please fix. In addition I see some warnings about unclosed files from the tests. There my suggestion would be to use I noticed that tests for I would also suggest to start to put Otherwise, opening up the
Another one is the
There's also a remaining import of fermipy from here:
@woodmd - Is it useful if I point out such things? |
Ok I'll have a look. I wasn't getting this error when I ran unit tests locally so it must be something to do with python3 or version of numpy.
I don't have a strong feeling about this so I'm happy to adopt whatever convention you use elsewhere.
I fully agree. If you create a page in the appropriate place of the docs hierarchy I can start writing documentation there.
Yes I'm aware of these. Most of these arise from code that I've copied from fermipy but haven't yet written unit tests for so I wouldn't really spend time on these (I can run pyflakes just as easily). What I was mainly looking for feedback on was the overall design with respect to class hierarchy and interfaces. |
@woodmd - With #1063 merged tests here should now run when you push a new commit.
|
Thanks for adding healpy to the travis builds. I'll take care of making a commit to this PR adding a placeholder for the documentation. |
The remaining errors appear to be unrelated to this PR. Merging now. |
This PR contains changes related to ongoing development in
gammapy.maps
. All of the code here is in an experimental/development state so it's possible that method and class names may change in the future. The intention was to give everyone an opportunity to review and give feedback on the current class/interface design. A quick summary of the updates included here:MapBase
class that defines abstract methods for accessing the contents of a map. My plan is to have two concrete instances each for WCS and HPX -- one for non-sparse maps (HpxMapND
andWcsMapND
) and one for sparse maps (HpxMapSparse
andWcsMapSparse
). Both can represent maps of arbitrary dimensionality (i.e. 2 +N).HpxMapND
. These support reading/writing maps to FITS according to the format conventions documented here. There are still a few aspects of the format that need to be worked out -- mostly pertaining to how axes can be extracted from the BANDS table in an automated way.There's obviously still a lot of work to be done but I plan to continue working on this over the next few months. Once I'm satisfied that these classes have everything we need in fermipy I would start working on copying over functionality from SkyImage and SkyCube.