Add all-sky image class and update existing tile code #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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 ahips.utils.ImageFile
class, and introduce a separatehips.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 thatHipsTileAllskyArray
duplicates a lot fromHipsTile
which is bad, and still, because onHipsTile
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