Skip to content

Commit

Permalink
fixing test \
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Nov 9, 2017
1 parent 0b457b0 commit 1d27d50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mrspoc/tests/test_centroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def test_centroid_small_spots(x):
python -c "from mrspoc.tests.test import test_centroid_small_spots as f; f()"
"""
star = Star()
star.spots = [Spot(x=x, y=0.0, r=0.01)]
star.spots = [Spot(x=x, y=0.0, r=0.03)]

x0, y0 = star._centroid_analytic()
x1, y1 = star._centroid_numerical()

diff = np.sqrt((x0 - x1)**2 + (y0 - y1)**2)
assert diff < 0.00001
assert diff < 5e-5


@pytest.mark.parametrize('x', (0.8, 0.6, 0.4, 0.2, 0.0))
Expand All @@ -34,4 +34,4 @@ def test_centroid_large_spots(x):

# Allow for bigger error because large spots are more affected by difference
# in limb-darkening across the spot.
assert diff < 0.0005
assert diff < 5e-4

0 comments on commit 1d27d50

Please sign in to comment.