-
Notifications
You must be signed in to change notification settings - Fork 16
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
Incorrect JPG, PNG tile drawing (precise algorithm) #98
Comments
yes, I'll have a look at this ASAP. |
@adl1995 : as JPEG/PNG tiles are vertically flipped with respect to FITS tiles, I think that the order of items in the |
@tboch Did you mean changing the order of But, this did not have any effect. Here is the updated notebook: https://github.com/adl1995/HIPS-to-Py/blob/master/examples/Precise%20drawing.ipynb Also, the order of children tiles is now incorrect, as it can be seen in the last cell of the notebook. |
yes, that's what I meant. |
@adl1995 OK, I think I understand better now what happens now. Actually, when children tiles are created, the order of items in the data = [
self.data[w: w * 2, 0: w],
self.data[0: w, 0: w],
self.data[w: w * 2, w: w * 2],
self.data[0: w, w: w * 2]
] This seems to be independent from the tile format |
@tboch Thanks! The drawing works now. I will open up a PR shortly. |
@tboch - You've probably seen this by now, but just in case: in https://github.com/hipspy/hips/pull/90/files#diff-a61b34ea30f91431cdbfd58e3c54dd89R142 I changed tile I/O to always flip to the FITS orientation on I/O, i.e. within the HiPS package we have to do less work and not consider two cases or orientation any more. Do you think that approach is OK or is it bad for some reason? (clearly it's not optimal performance, but I think the performance overhead on memory / CPU should be very small compared to other things we do with tiles?) |
I think this approach is OK as we can now manage tiles in a homogeneous way |
I'm currently working on introducing precise drawing, the tile splitting works correctly, but, when I try and draw the all sky image, I end up with something like this:
But, it works fine using the simple algorithm:
Note: this issue is only for JPG and PNG tiles, the FITS tiles are being drawn correctly using the precise algorithm.
I tried displaying the JPG tile children individually, and I get this result:
The original tile is this:
So, there is no issue with the
children
property as far as I can tell, my guess is that this has something to do with how the corners are being computed. The Jupyter notebook containing this code can be found here: https://github.com/adl1995/HIPS-to-Py/blob/master/examples/Precise%20drawing.ipynbSince @cdeil is on vacation, @tboch can you please take a look at this?
The text was updated successfully, but these errors were encountered: