Skip to content

Commit

Permalink
Merge pull request #14382 from mhvk/iers-new-iers-b-format
Browse files Browse the repository at this point in the history
Update IERS_B file and adjust to new-style
  • Loading branch information
mhvk committed Feb 17, 2023
2 parents 6989544 + 54e4ca4 commit 0cac669
Show file tree
Hide file tree
Showing 12 changed files with 22,460 additions and 22,332 deletions.
12 changes: 8 additions & 4 deletions astropy/coordinates/tests/test_intermediate_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,9 @@ def test_aa_hd_high_precision():
Updated 2020-11-29, after the comparison between codes became even better,
down to 100 nas.
Updated 2023-02-14, after IERS changes the IERS B format and analysis,
causing small deviations.
NOTE: the agreement reflects consistency in approach between two codes,
not necessarily absolute precision. If this test starts failing, the
tolerance can and should be weakened *if* it is clear that the change is
Expand All @@ -1105,8 +1108,9 @@ def test_aa_hd_high_precision():
# Numbers from
# https://github.com/astropy/astropy/pull/11073#issuecomment-735486271
# updated in https://github.com/astropy/astropy/issues/11683
TARGET_AZ, TARGET_EL = 15.032673509956 * u.deg, 50.303110133923 * u.deg
TARGET_DISTANCE = 376252883.247239 * u.m
# and again after the IERS_B change.
TARGET_AZ, TARGET_EL = 15.032673662647138 * u.deg, 50.303110087520054 * u.deg
TARGET_DISTANCE = 376252.88325051306 * u.km
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)
Expand All @@ -1129,8 +1133,8 @@ def test_aa_high_precision_nodata():
with a version of the code that passes the tests above, but for the internal solar system
ephemerides to avoid the use of remote data.
"""
# Last updated when switching to erfa 2.0.0 and its moon98 function.
TARGET_AZ, TARGET_EL = 15.03231495 * u.deg, 50.3027193 * u.deg
# Last updated when the new IERS B format and analysis was introduced.
TARGET_AZ, TARGET_EL = 15.0323151 * u.deg, 50.30271925 * u.deg
lat = -22.959748 * u.deg
lon = -67.787260 * u.deg
elev = 5186 * u.m
Expand Down
50 changes: 50 additions & 0 deletions astropy/utils/iers/data/ReadMe.eopc04
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Table: eopc04.1962-now
================================================================================

from https://hpiers.obspm.fr/iers/eop/eopc04/eopc04.1962-now

# EARTH ORIENTATION PARAMETER (EOP) PRODUCT CENTER CENTER (PARIS OBSERVATORY) - INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE
# EOP (IERS) 20 C04 TIME SERIES consistent with ITRF 2020 - sampled at 0h UTC
# Contact: christian.bizouard@obspm.fr
# Reference Precession-Nutation Model: IAU 2000
# format(4(i4),f10.2,2(f12.6),f12.7,2(f12.6),2(f12.6),f12.7,2(f12.6),f12.7,2(f12.6),2(f12.6),f12.7)
# YR MM DD HH MJD x(") y(") UT1-UTC(s) dX(") dY(") xrt(") yrt(") LOD(s) x Er y Er UT1-UTC Er dX Er dY Er xrt Er yrt Er LOD Er
1962 1 1 0 37665.00 -0.012700 0.213000 0.0326338 0.000000 0.000000 0.000000 0.000000 0.0017230 0.030000 0.030000 0.0020000 0.004774 0.002000 0.000000 0.000000 0.0014000
# 345678901234567890123456789012345678901234567890123456789012345678901234567890
================================================================================

File Summary:
--------------------------------------------------------------------------------
FileName Lrecl Records Explanations
--------------------------------------------------------------------------------
ReadMe 80 . This file, made using header
eopc04.1962-now 218 22301 All EOP values since 01 January 1962
--------------------------------------------------------------------------------

================================================================================
Byte-by-byte Description of file: *
--------------------------------------------------------------------------------
Bytes Format Units Label Explanations
--------------------------------------------------------------------------------
1- 4 I4 --- year Calendar year
5- 8 I4 --- month Month
9- 12 I4 --- day Day of month
13- 16 I4 --- hour Hour UTC
17- 26 F10.2 d MJD Modified Julian Date
27- 38 F12.6 arcsec PM_x Pole coordinate x
39- 50 F12.6 arcsec PM_y Pole coordinate y
51- 62 F12.7 s UT1_UTC Difference UT1-UTC
63- 74 F12.6 arcsec dX_2000A Pole offset dX wrt IAU2000A Nutation
75- 86 F12.6 arcsec dY_2000A Pole offset dY wrt IAU2000A Nutation
87- 98 F12.6 arcsec/d PM_x_dot Pole coordinate rate x
99-110 F12.6 arcsec/d PM_y_dot Pole coordinate rate y
111-122 F12.7 s LOD Length of day offset
123-134 F12.6 arcsec e_PM_x Error in PM_x
135-146 F12.6 arcsec e_PM_y Error in PM_y
147-158 F12.7 s e_UT1_UTC Error in UT1_UTC
159-170 F12.6 arcsec e_dX_2000A Error in dX_2000A
171-182 F12.6 arcsec e_dY_2000A Error in dY_2000A
183-194 F12.6 arcsec/d e_PM_x_dot Error in PM_x_dot
195-206 F12.6 arcsec/d e_PM_y_dot Error in PM_y_dot
207-218 F12.7 s e_LOD Error in LOD
--------------------------------------------------------------------------------

0 comments on commit 0cac669

Please sign in to comment.