# Path: skyfield/almanac.py
# def phase_angle(ephemeris, body, t):
# def fraction_illuminated(ephemeris, body, t):
# def seasons(ephemeris):
#     def season_at(t):
# def moon_phase(ephemeris, t):
# def moon_phases(ephemeris):
#     def moon_phase_at(t):
# def moon_nodes(ephemeris):
#     def moon_node_at(t):
# def oppositions_conjunctions(ephemeris, target):
#     def leading_or_trailing(t):
# def meridian_transits(ephemeris, target, topos):
#     def west_of_meridian_at(t):
# def sunrise_sunset(ephemeris, topos):
#     def is_sun_up_at(t):
# def dark_twilight_day(ephemeris, topos):
#     def is_it_dark_twilight_day_at(t):
# def risings_and_settings(ephemeris, target, topos,
#                          horizon_degrees=-34.0/60.0, radius_degrees=0): #?
#     def is_body_up_at(t):
# SEASONS = [
#     'Spring',
#     'Summer',
#     'Autumn',
#     'Winter',
# ]
# SEASON_EVENTS = [
#     'Vernal Equinox',
#     'Summer Solstice',
#     'Autumnal Equinox',
#     'Winter Solstice',
# ]
# SEASON_EVENTS_NEUTRAL = [
#     'March Equinox',
#     'June Solstice',
#     'September Equinox',
#     'December Solstice',
# ]
# MOON_PHASES = [
#     'New Moon',
#     'First Quarter',
#     'Full Moon',
#     'Last Quarter',
# ]
# MOON_NODES = [
#     'descending',
#     'ascending',
# ]
# CONJUNCTIONS = [
#     'conjunction',
#     'opposition',
# ]
# MERIDIAN_TRANSITS = ['Antimeridian transit', 'Meridian transit']
# TWILIGHTS = {
#     0: 'Night',
#     1: 'Astronomical twilight',
#     2: 'Nautical twilight',
#     3: 'Civil twilight',
#     4: 'Day',
# }
# 
# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/nutationlib.py
# def iau2000b(jd_tt):
#     """Compute Earth nutation based on the faster IAU 2000B nutation model.
# 
#     `jd_tt` - Terrestrial Time: Julian date float, or NumPy array of floats
# 
#     Returns a tuple ``(delta_psi, delta_epsilon)`` measured in tenths of
#     a micro-arcsecond.  Each is either a float, or a NumPy array with
#     the same dimensions as the input argument.  The result will not take
#     as long to compute as the full IAU 2000A series, but should still
#     agree with ``iau2000a()`` to within a milliarcsecond between the
#     years 1995 and 2020.
# 
#     """
#     dpsi, deps = iau2000a(jd_tt, 2, 77, 0)
#     dpsi += -0.000135e7
#     deps +=  0.000388e7
#     return dpsi, deps


import numpy as np
from skyfield import almanac, api
from skyfield.nutationlib import iau2000b
from time import time
"""
On my laptop, this script shows that simply computing the positions and
the sunlit-ness of the ISS for each of the 381 seconds of this pass
takes roughly the same amount of time as mounting a full search for the
moment it passes into shadow.  But the benefit is far greater, because
with almost no additional expense all altitudes and azimuths can also
be computed.

"""


# Path: skyfield/almanac.py
# def phase_angle(ephemeris, body, t):
# def fraction_illuminated(ephemeris, body, t):
# def seasons(ephemeris):
#     def season_at(t):
# def moon_phase(ephemeris, t):
# def moon_phases(ephemeris):
#     def moon_phase_at(t):
# def moon_nodes(ephemeris):
#     def moon_node_at(t):
# def oppositions_conjunctions(ephemeris, target):
#     def leading_or_trailing(t):
# def meridian_transits(ephemeris, target, topos):
#     def west_of_meridian_at(t):
# def sunrise_sunset(ephemeris, topos):
#     def is_sun_up_at(t):
# def dark_twilight_day(ephemeris, topos):
#     def is_it_dark_twilight_day_at(t):
# def risings_and_settings(ephemeris, target, topos,
#                          horizon_degrees=-34.0/60.0, radius_degrees=0): #?
#     def is_body_up_at(t):
# SEASONS = [
#     'Spring',
#     'Summer',
#     'Autumn',
#     'Winter',
# ]
# SEASON_EVENTS = [
#     'Vernal Equinox',
#     'Summer Solstice',
#     'Autumnal Equinox',
#     'Winter Solstice',
# ]
# SEASON_EVENTS_NEUTRAL = [
#     'March Equinox',
#     'June Solstice',
#     'September Equinox',
#     'December Solstice',
# ]
# MOON_PHASES = [
#     'New Moon',
#     'First Quarter',
#     'Full Moon',
#     'Last Quarter',
# ]
# MOON_NODES = [
#     'descending',
#     'ascending',
# ]
# CONJUNCTIONS = [
#     'conjunction',
#     'opposition',
# ]
# MERIDIAN_TRANSITS = ['Antimeridian transit', 'Meridian transit']
# TWILIGHTS = {
#     0: 'Night',
#     1: 'Astronomical twilight',
#     2: 'Nautical twilight',
#     3: 'Civil twilight',
#     4: 'Day',
# }
# 
# Path: skyfield/api.py
# N = E = +1.0
# S = W = -1.0
# 
# Path: skyfield/nutationlib.py
# def iau2000b(jd_tt):
#     """Compute Earth nutation based on the faster IAU 2000B nutation model.
# 
#     `jd_tt` - Terrestrial Time: Julian date float, or NumPy array of floats
# 
#     Returns a tuple ``(delta_psi, delta_epsilon)`` measured in tenths of
#     a micro-arcsecond.  Each is either a float, or a NumPy array with
#     the same dimensions as the input argument.  The result will not take
#     as long to compute as the full IAU 2000A series, but should still
#     agree with ``iau2000a()`` to within a milliarcsecond between the
#     years 1995 and 2020.
# 
#     """
#     dpsi, deps = iau2000a(jd_tt, 2, 77, 0)
#     dpsi += -0.000135e7
#     deps +=  0.000388e7
#     return dpsi, deps


# Path: design/satellite_passes.py
import numpy as np
from skyfield import almanac, api
from skyfield.nutationlib import iau2000b
from time import time

"""
On my laptop, this script shows that simply computing the positions and
the sunlit-ness of the ISS for each of the 381 seconds of this pass
takes roughly the same amount of time as mounting a full search for the
moment it passes into shadow.  But the benefit is far greater, because
with almost no additional expense all altitudes and azimuths can also
be computed.

"""


ts = api.load.timescale()