
    R1i                     \    d Z ddlZddlZddlmZ ddlmZ d Zd Z	d Z
edk(  r e
        yy)	z,Routines to download Earth orientation data.    N)load)julian_datec                      ddl } t        j                  d      }| j                  |j	                               }|d   }| j                  |d   |d   d      S )zDTable of smoothed Delta T values from Morrison and Stephenson, 2004.r   Nz/http://eclipse.gsfc.nasa.gov/SEcat5/deltat.html   )yeardelta_t)pandasr   open	read_htmlread	DataFrame)pdftablesdfs       c/home/cursorai/projects/iching/venv/lib/python3.12/site-packages/skyfield/data/earth_orientation.py"morrison_and_stephenson_2004_tabler   	   sM    		CDA\\!&&(#F	B<<A2a59::    c                    | j                         }d}|j                  |      }|d   j                         d   j                  d      j                         }t	        j
                  |d   j                               }||j                  fS )u,  Parse polynomial coefficients from Table S15.

    The table is available at the website of Her Majesty's Nautical
    Almanac Office, from the paper “Measurement of the Earth's Rotation:
    720 BC to AD 2015” by L.V. Morrison, F.R. Stephenson, C.Y. Hohenkerk
    and M. Zawilski 2021.

    sJ   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r   zutf-8   )r   split
splitlinesdecodenploadtxtT)r   contentbannersectionsnamestables         r   parse_S15_tabler#      sv     ffhG F}}V$HQK""$R(//8>>@EJJx{--/0E%''>r   c                  f   t         j                  j                  t              } t	               }|j
                  j                  }t        |dd      }|j                  j                  }t        j                  ||f      }t        j                  t         j                  j                  | d      |       y )Nr   zmorrison_stephenson_deltat.npy)ospathdirname__file__r   r   valuesr   r   r   arraysavejoin)thisdirr   r   jdr   r*   s         r   mainr/   "   sy    ggooh'G	+	-B77>>D	T1a	 BjjGHHb']#EGGBGGLL"BCr   __main__)__doc__numpyr   r%   skyfield.apir   skyfield.timelibr   r   r#   r/   __name__ r   r   <module>r7      s7    2  	  (;"	 zF r   