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

Fix bugs that caused bricks to be larger than bricksize. #84

Merged
merged 10 commits into from Sep 7, 2017

Conversation

dstndstn
Copy link
Contributor

@dstndstn dstndstn commented Sep 7, 2017

Fixes some implicit assumptions that bricksize evenly divides 180 degrees:

  • don't assume the last brick is at the north pole (Dec=90)
  • avoid Dec edges exceeding 90 degrees
  • avoid Dec array indexing error
  • fix handling of the equator in computing required number of bricks in a row

Copy link
Member

@weaverba137 weaverba137 left a comment

Choose a reason for hiding this comment

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

Just a few minor changes.

@@ -9,9 +9,13 @@ Change Log
in an installed package, as opposed to a git checkout (PR `#80`_).
* Fixed bug in :meth:`desiutil.brick.Bricks.brick_radec` handling scalar inputs
(PR `#81`_).
* Fixed bugs that could cause bricks to be slightly too big, and that
Copy link
Member

Choose a reason for hiding this comment

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

This PR is #84, not #82.

@@ -85,6 +85,43 @@ def test_brickvertices_wrap(self):
self.assertEqual(np.max(b1[:,0])-np.min(b1[:,0]), 360.)
self.assertTrue(np.all(b1[:,1] >= -90.))

def test_uneven_bricksize(self):
Copy link
Member

Choose a reason for hiding this comment

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

Please add a __doc__ string.

@weaverba137
Copy link
Member

One non-critical test is stalled, merging anyway.

@weaverba137 weaverba137 merged commit fcefcf9 into master Sep 7, 2017
@weaverba137 weaverba137 deleted the bricksize branch September 7, 2017 21:05
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

2 participants