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

Healpix bugfix #52

Merged
merged 4 commits into from
Oct 10, 2018
Merged

Healpix bugfix #52

merged 4 commits into from
Oct 10, 2018

Conversation

AaronParsons
Copy link
Collaborator

Turns out px2crd was completely broken as previously written. Added unit test that exposed it, and then fixed the problem.

@AaronParsons AaronParsons requested a review from pkgw October 6, 2018 00:04
@coveralls
Copy link

coveralls commented Oct 6, 2018

Coverage Status

Coverage increased (+0.3%) to 47.625% when pulling 4a19408 on healpix_bugfix into 5eff206 on master.

@@ -48,6 +48,14 @@ def test_vec2px(self):
px = self.hpb.crd2px(x,y,z)
self.assertEqual(len(px), len(x))
n.testing.assert_allclose(px, n.array([3728, 2192, 1069, 247, 19, 13, 225, 1023, 2128, 3664]))
def test_px2vec(self):
x,y = n.linspace(-.5,.5,10), n.linspace(-.5,.5,10)
z = 1 - n.sqrt(x**2 + y**2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, do these assignments to x, y, and z do anything? Aren't they immediately overwritten in line 55?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Just sloppiness on my part. Sorry.

@AaronParsons
Copy link
Collaborator Author

After these tests pass, I'm good to go on this PR.

@pkgw pkgw merged commit 7310b1d into master Oct 10, 2018
@pkgw pkgw deleted the healpix_bugfix branch October 10, 2018 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants