hipspy / hips

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

Add classmethod create_simple to WCSGeometry #49

Closed adl1995 closed 7 years ago

adl1995 commented 7 years ago

Added a classmethod as mentioned in #39.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.2%) to 87.39% when pulling 2a4229e34ae0ba8af508b94b6ec27ba56656ef94 on adl1995:create_wcs into 84d60c18e2139a3e55a25d59c95198d6825648fe on hipspy:master.

adl1995 commented 7 years ago

@cdeil - I just made another commit. Hopefully this resolves all the issues.

cdeil commented 7 years ago

See https://travis-ci.org/hipspy/hips/jobs/249595428#L1148 (always run tests locally before pushing)


Before we merge I have two questions on user interface, @tboch and @adl1995 - please comment:

adl1995 commented 7 years ago

@cdeil - How about create_from_fov? I'm fine with taking two separate arguments instead of shape.

adl1995 commented 7 years ago

I made another commit. However, as I pulled the latest code from master branch, I now have a commit named:

Merge branch 'master' of https://github.com/hipspy/hips into create_wcs

cdeil commented 7 years ago

The common way to avoid these merge commits is to "rebase" instead of "merging". Please read the Astropy dev docs (or other resources) explaining this and do that in the future. For this PR: either leave as-is, or fix it up (e.g. by squashing commits, or doing a hard reset on the commit before the merge commit).

adl1995 commented 7 years ago

@cdeil - I have removed the merge commit.

tboch commented 7 years ago

Things look fine for me. I like @cdeil 's suggestion to split the shape argument into width and height. Do we leave that for another pull request?

cdeil commented 7 years ago

As discussed in telcon: suggest to keep Shape attribute on WCSGeometry as-is, but only to take parameters nx and ny separately in constructors and make and store the Shape on self.

cdeil commented 7 years ago

Correction: call it width and height (both in the constructor arguments, and in the Shape attributes.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.2%) to 86.726% when pulling c5d4615be2ca334e52e1d60579b3363d8c66fe1f on adl1995:create_wcs into e6e87472f73704ebee1073dc18c842d392b7385c on hipspy:master.

adl1995 commented 7 years ago

@cdeil I have made a commit updating the shape parameter.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.2%) to 86.726% when pulling 1465e559b90c925e2083f7f6d67b689a359e1fb8 on adl1995:create_wcs into e6e87472f73704ebee1073dc18c842d392b7385c on hipspy:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.2%) to 87.059% when pulling 8cdd34cad90facf9348d9bf7014260e9f75aae77 on adl1995:create_wcs into 4264f5379852bc4a013f6fcf7ce2d926582e4dfd on hipspy:master.

adl1995 commented 7 years ago

@cdeil I have updated the test cases. The build is passing now. However, I did make some changes on my local notebook, but the results looked identical to me. Please verify before merging.

cdeil commented 7 years ago

@adl1995 - Thanks for fixing the bug where the values in crpix were switched in create_simple.

I've attached two commits here, one with minor cleanup, and one fixing this test fail: https://gist.github.com/cdeil/04226e02ea9c924d24ae91d53e75dcf5

For now I've simply updated the reference value, I'm not sure which is correct. Also, the high-level docs example is broken now (stuck fetching tiles forever).

I think we should just merge the open PRs in today, especially the tile order computation step, and then re-start debugging.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.2%) to 87.059% when pulling 9b02fe304fd842eda561c0179a658d9321a66e0b on adl1995:create_wcs into 4264f5379852bc4a013f6fcf7ce2d926582e4dfd on hipspy:master.