hipspy / hips

Python library to handle HiPS
https://hips.readthedocs.io
12 stars 16 forks source link

Add method to_split in SimpleTilePainter for checking whether to split a tile #89

Closed adl1995 closed 7 years ago

adl1995 commented 7 years ago

As mentioned in issue #84, I have added two methods to_split and _measure_tile_shape which are used for checking whether a tile needs to be split or not. The next step is to perform the actual splitting and modify the projection part to take in the correct tile_width (half, in case a tile is split).

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 96.792% when pulling 71be503158a7de7f6e3588059c1890597936405c on adl1995:tile_split into fce110c0e2bf31baba5d9050ccf08a9c67493dff on hipspy:master.

adl1995 commented 7 years ago

@cdeil I just made the updates.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 96.798% when pulling cdb2003280b6c820e71ec6bec1013dfa823666ae on adl1995:tile_split into fce110c0e2bf31baba5d9050ccf08a9c67493dff on hipspy:master.

adl1995 commented 7 years ago

@cdeil Okay, I made the changes. However, the test results vary from before. I'm not sure if these are the correct ones or if the previous ones were.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.08%) to 96.768% when pulling 1d98898abfedbf85b5a75cc1bc95e423c850487c on adl1995:tile_split into fce110c0e2bf31baba5d9050ccf08a9c67493dff on hipspy:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.08%) to 96.768% when pulling 1d98898abfedbf85b5a75cc1bc95e423c850487c on adl1995:tile_split into fce110c0e2bf31baba5d9050ccf08a9c67493dff on hipspy:master.

adl1995 commented 7 years ago

@cdeil Alright, just made the changes. Please check.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.07%) to 96.756% when pulling 808e758d2cd9c04c31e0dc49318cf55d4f92cd18 on adl1995:tile_split into fce110c0e2bf31baba5d9050ccf08a9c67493dff on hipspy:master.

cdeil commented 7 years ago

@adl1995 - FYI: I've done a small update to this code in 1b36234 The small advantage of having the test this way is that it's independent and faster.

Another thing I noticed was that I had to put bool explicitly for is_tile_distorted. Previously it was returning numpy.bool_ which has the very surprising behaviour:

>>> np.bool_(True) is True
False