Skip to content

TST: Relax test_aa_high_precision#11564

Merged
mhvk merged 2 commits intoastropy:mainfrom
pllim:shhhh-round-earth
Apr 15, 2021
Merged

TST: Relax test_aa_high_precision#11564
mhvk merged 2 commits intoastropy:mainfrom
pllim:shhhh-round-earth

Conversation

@pllim
Copy link
Member

@pllim pllim commented Apr 14, 2021

Description

This pull request is to fix #11527 unless someone has a better solution.

If this does not need backporting, feel free to re-milestone.

Note to reviewers: Check the "allowed failure" job.

assert_allclose(moon_aa.az, TARGET_AZ, atol=0.1*u.uas, rtol=0)
assert_allclose(moon_aa.alt, TARGET_EL, atol=0.1*u.uas, rtol=0)
assert_allclose(moon_aa.distance, TARGET_DISTANCE, atol=0.1*u.mm, rtol=0)
assert_allclose(moon_aa.az, TARGET_AZ, atol=0.1*u.uas, rtol=3.7e-10)
Copy link
Contributor

Choose a reason for hiding this comment

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

@pllim - could you increase the absolute tolerance by a factor 10 instead? That is more in the spirit of the test.... Sorry for the bother!

Copy link
Member Author

Choose a reason for hiding this comment

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

Factor of 10 is 1 * u.uas, right? That won't cut it.

>>> moon_aa.az
<Longitude 15.03267352 deg>
>>> TARGET_AZ
<Quantity 15.03267351 deg>
>>> moon_aa.az - TARGET_AZ
<Angle 5.44987699e-09 deg>
>>> (moon_aa.az - TARGET_AZ).to(u.uas)
<Angle 19.61955718 uas>

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the tests to relax atol to the smallest values that would make the comparison pass (at least locally).

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, that sounds good - we definitely want the tests to pass again!

Copy link
Member Author

Choose a reason for hiding this comment

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

They did pass, but I have no idea what this change means. Is the moon not where it is supposed to be?

DSI_hdapproach

Copy link
Contributor

Choose a reason for hiding this comment

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

It is just that with the slightly more accurate way erfa deals with polar motion, implied coordinates differ a bit.

@pllim pllim force-pushed the shhhh-round-earth branch from 57a2330 to 721273b Compare April 14, 2021 21:38
@mhvk
Copy link
Contributor

mhvk commented Apr 15, 2021

Let's get this in!

@mhvk mhvk merged commit 071d341 into astropy:main Apr 15, 2021
@pllim pllim deleted the shhhh-round-earth branch April 15, 2021 13:58
@astrofrog astrofrog modified the milestones: v4.0.6, v4.3 Aug 16, 2021
@astrofrog
Copy link
Member

This test did not exist in v4.0.x so changing milestone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: test_aa_high_precision failed with float comparison

3 participants