# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/data/iers.py
# _R = (b'(?m)^......(.........) . '
#       b'(.\\d.......)......... '
#       b'(.\\d.......).........  '
#       b'.(.\\d........)')
# def parse_x_y_dut1_from_finals_all(f):
# def install_polar_motion_table(ts, finals_data):
# def build_timescale_arrays(utc_mjd, dut1):
# def parse_dut1_from_finals_all(f):
# 
# Path: skyfield/data/earth_orientation.py
# def parse_S15_table(f):
#     """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.
# 
#     """
#     # http://astro.ukho.gov.uk/nao/lvm/Table-S15.2020.txt
#     content = f.read()
#     banner = b'- ' * 36 + b'-\n'
#     sections = content.split(banner)
#     names = sections[1].splitlines()[-1].decode('utf-8').split()
#     table = np.loadtxt(sections[2].splitlines())
#     return names, table.T


import argparse
import os
import sys
import numpy as np
from numpy import array
from skyfield.api import load
from skyfield.data import iers
from skyfield.data.earth_orientation import parse_S15_table
#!/usr/bin/env python3




def main(argv):
    parser = argparse.ArgumentParser(description='Save arrays to a file')
    parser.parse_args(argv)

    g = globals()
    save('skyfield/data/nutation', {key: g[key] for key in [
        'ke0_t',
        'ke1',
        'lunisolar_longitude_coefficients',
        'lunisolar_obliquity_coefficients',
        'nals_t',
        'napl_t',
        'nutation_coefficients_longitude',
        'nutation_coefficients_obliquity',
        'se0_t_0',
        'se0_t_1',
    ]})

    url = 'http://astro.ukho.gov.uk/nao/lvm/Table-S15.2020.txt'

# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/data/iers.py
# _R = (b'(?m)^......(.........) . '
#       b'(.\\d.......)......... '
#       b'(.\\d.......).........  '
#       b'.(.\\d........)')
# def parse_x_y_dut1_from_finals_all(f):
# def install_polar_motion_table(ts, finals_data):
# def build_timescale_arrays(utc_mjd, dut1):
# def parse_dut1_from_finals_all(f):
# 
# Path: skyfield/data/earth_orientation.py
# def parse_S15_table(f):
#     """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.
# 
#     """
#     # http://astro.ukho.gov.uk/nao/lvm/Table-S15.2020.txt
#     content = f.read()
#     banner = b'- ' * 36 + b'-\n'
#     sections = content.split(banner)
#     names = sections[1].splitlines()[-1].decode('utf-8').split()
#     table = np.loadtxt(sections[2].splitlines())
#     return names, table.T


# Path: builders/build_arrays.py
import argparse
import os
import sys
import numpy as np
from numpy import array
from skyfield.api import load
from skyfield.data import iers
from skyfield.data.earth_orientation import parse_S15_table

#!/usr/bin/env python3




def main(argv):
    parser = argparse.ArgumentParser(description='Save arrays to a file')
    parser.parse_args(argv)

    g = globals()
    save('skyfield/data/nutation', {key: g[key] for key in [
        'ke0_t',
        'ke1',
        'lunisolar_longitude_coefficients',
        'lunisolar_obliquity_coefficients',
        'nals_t',
        'napl_t',
        'nutation_coefficients_longitude',
        'nutation_coefficients_obliquity',
        'se0_t_0',
        'se0_t_1',
    ]})

    url = 'http://astro.ukho.gov.uk/nao/lvm/Table-S15.2020.txt'

    with load.open(url) as f: