Skip to content
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

Add all-sky image class and update existing tile code #86

Merged
merged 1 commit into from
Jul 21, 2017

Conversation

cdeil
Copy link
Contributor

@cdeil cdeil commented Jul 21, 2017

This PR introduces support for all-sky combined tile images such as:
https://github.com/hipspy/hips-extra/blob/master/datasets/samples/FermiColor/Norder3/Allsky.jpg

I'm not happy at all with the implementation: to re-use the image I/O functionality, I had to sub-class

class HipsTileAllskyArray(HipsTile):

which is very weird.

I'm not sure yet what a good design is. Maybe move the image handling and I/O functionality from HipsTile to a hips.utils.ImageFile class, and introduce a separate hips.utils.ImageArray class which has a Numpy array data member instead of an encoded bytes attribute. Or get rid of those classes and instead use more functions, like they do in scikit-image. If you look at the tests here, you'll see that HipsTileAllskyArray duplicates a lot from HipsTile which is bad, and still, because on HipsTile creation JPG encoding happens, it's not possible to process the non-encoded pixels properly. Something to think about and discuss next week ...

The reason I implemented this now is that we need it here to generate HiPS from our data that works with Aladin Lite, i.e. we need to make an all-sky file:
https://github.com/gammapy/gamma-sky/blob/af2529a996bca1d09cb2e2fd10d65a61b4465344/gammasky/maps.py#L133

@cdeil cdeil added this to the 0.1 milestone Jul 21, 2017
@cdeil cdeil self-assigned this Jul 21, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 96.686% when pulling fc5a870 on cdeil:allsky into 354eb15 on hipspy:master.

@cdeil cdeil changed the title Add all-sky image class and major update to existing tile code Add all-sky image class and update existing tile code Jul 21, 2017
@cdeil cdeil merged commit fce110c into hipspy:master Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants