mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
Add stubs for ephem (#15191)
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
"stubs/defusedxml",
|
||||
"stubs/docker",
|
||||
"stubs/docutils",
|
||||
"stubs/ephem",
|
||||
"stubs/Flask-SocketIO",
|
||||
"stubs/fpdf2",
|
||||
"stubs/gdb",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Tests
|
||||
ephem.tests.*
|
||||
|
||||
# Leaked loop variables
|
||||
ephem.stars.k
|
||||
ephem.stars.v
|
||||
|
||||
# Runtime signature has *args/**kwargs that raise TypeError; stub signature is correct
|
||||
ephem._libastro.Observer.__init__
|
||||
ephem.FixedBody.__init__
|
||||
ephem._libastro.FixedBody.__init__
|
||||
@@ -0,0 +1,2 @@
|
||||
version = "4.2.*"
|
||||
upstream_repository = "https://github.com/brandon-rhodes/pyephem"
|
||||
@@ -0,0 +1,287 @@
|
||||
from collections.abc import Callable
|
||||
from datetime import datetime as _datetime, timedelta as _timedelta, tzinfo as _tzinfo
|
||||
from typing import Final, NoReturn, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from . import _libastro
|
||||
|
||||
__version__: Final[str]
|
||||
|
||||
# Mathematical constants
|
||||
tau: Final[float]
|
||||
twopi: Final[float]
|
||||
halfpi: Final[float]
|
||||
quarterpi: Final[float]
|
||||
eighthpi: Final[float]
|
||||
degree: Final[float]
|
||||
arcminute: Final[float]
|
||||
arcsecond: Final[float]
|
||||
half_arcsecond: Final[float]
|
||||
tiny: Final[float]
|
||||
|
||||
# Physical constants
|
||||
c: Final[float]
|
||||
meters_per_au: Final[float]
|
||||
earth_radius: Final[float]
|
||||
moon_radius: Final[float]
|
||||
sun_radius: Final[float]
|
||||
|
||||
# Epoch constants
|
||||
B1900: Final[float]
|
||||
B1950: Final[float]
|
||||
J2000: Final[float]
|
||||
|
||||
# Type imports from _libastro
|
||||
Angle = _libastro.Angle
|
||||
degrees = _libastro.degrees
|
||||
hours = _libastro.hours
|
||||
Date = _libastro.Date
|
||||
|
||||
# Time constants
|
||||
hour: Final[float]
|
||||
minute: Final[float]
|
||||
second: Final[float]
|
||||
|
||||
# Precision constants
|
||||
default_newton_precision: Final[float]
|
||||
rise_set_iterations: Final[tuple[int, int, int, int, int, int, int]]
|
||||
|
||||
# Function imports from _libastro
|
||||
delta_t = _libastro.delta_t
|
||||
julian_date = _libastro.julian_date
|
||||
|
||||
# Body type imports from _libastro
|
||||
Body = _libastro.Body
|
||||
Planet = _libastro.Planet
|
||||
PlanetMoon = _libastro.PlanetMoon
|
||||
FixedBody = _libastro.FixedBody
|
||||
EllipticalBody = _libastro.EllipticalBody
|
||||
ParabolicBody = _libastro.ParabolicBody
|
||||
HyperbolicBody = _libastro.HyperbolicBody
|
||||
EarthSatellite = _libastro.EarthSatellite
|
||||
|
||||
# Database and coordinate functions from _libastro
|
||||
readdb = _libastro.readdb
|
||||
readtle = _libastro.readtle
|
||||
constellation = _libastro.constellation
|
||||
separation = _libastro.separation
|
||||
unrefract = _libastro.unrefract
|
||||
now = _libastro.now
|
||||
|
||||
# Star atlas functions from _libastro
|
||||
millennium_atlas = _libastro.millennium_atlas
|
||||
uranometria = _libastro.uranometria
|
||||
uranometria2000 = _libastro.uranometria2000
|
||||
|
||||
# Special planet classes from _libastro
|
||||
Jupiter = _libastro.Jupiter
|
||||
Saturn = _libastro.Saturn
|
||||
Moon = _libastro.Moon
|
||||
|
||||
# Dynamically created planet classes
|
||||
class Mercury(Planet):
|
||||
__planet__: Final = 0
|
||||
|
||||
class Venus(Planet):
|
||||
__planet__: Final = 1
|
||||
|
||||
class Mars(Planet):
|
||||
__planet__: Final = 2
|
||||
|
||||
class Uranus(Planet):
|
||||
__planet__: Final = 5
|
||||
|
||||
class Neptune(Planet):
|
||||
__planet__: Final = 6
|
||||
|
||||
class Pluto(Planet):
|
||||
__planet__: Final = 7
|
||||
|
||||
class Sun(Planet):
|
||||
__planet__: Final = 8
|
||||
|
||||
# Planet moon classes
|
||||
class Phobos(PlanetMoon):
|
||||
__planet__: Final = 10
|
||||
|
||||
class Deimos(PlanetMoon):
|
||||
__planet__: Final = 11
|
||||
|
||||
class Io(PlanetMoon):
|
||||
__planet__: Final = 12
|
||||
|
||||
class Europa(PlanetMoon):
|
||||
__planet__: Final = 13
|
||||
|
||||
class Ganymede(PlanetMoon):
|
||||
__planet__: Final = 14
|
||||
|
||||
class Callisto(PlanetMoon):
|
||||
__planet__: Final = 15
|
||||
|
||||
class Mimas(PlanetMoon):
|
||||
__planet__: Final = 16
|
||||
|
||||
class Enceladus(PlanetMoon):
|
||||
__planet__: Final = 17
|
||||
|
||||
class Tethys(PlanetMoon):
|
||||
__planet__: Final = 18
|
||||
|
||||
class Dione(PlanetMoon):
|
||||
__planet__: Final = 19
|
||||
|
||||
class Rhea(PlanetMoon):
|
||||
__planet__: Final = 20
|
||||
|
||||
class Titan(PlanetMoon):
|
||||
__planet__: Final = 21
|
||||
|
||||
class Hyperion(PlanetMoon):
|
||||
__planet__: Final = 22
|
||||
|
||||
class Iapetus(PlanetMoon):
|
||||
__planet__: Final = 23
|
||||
|
||||
class Ariel(PlanetMoon):
|
||||
__planet__: Final = 24
|
||||
|
||||
class Umbriel(PlanetMoon):
|
||||
__planet__: Final = 25
|
||||
|
||||
class Titania(PlanetMoon):
|
||||
__planet__: Final = 26
|
||||
|
||||
class Oberon(PlanetMoon):
|
||||
__planet__: Final = 27
|
||||
|
||||
class Miranda(PlanetMoon):
|
||||
__planet__: Final = 28
|
||||
|
||||
# Newton's method
|
||||
def newton(f: Callable[[float], float], x0: float, x1: float, precision: float = ...) -> float: ...
|
||||
|
||||
# Equinox and solstice functions
|
||||
def holiday(d0: _libastro._DateInitType, motion: float, offset: float) -> Date: ...
|
||||
def previous_vernal_equinox(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_vernal_equinox(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_summer_solstice(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_summer_solstice(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_autumnal_equinox(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_autumnal_equinox(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_winter_solstice(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_winter_solstice(date: _libastro._DateInitType) -> Date: ...
|
||||
|
||||
# Synonyms
|
||||
next_spring_equinox = next_vernal_equinox
|
||||
previous_spring_equinox = previous_vernal_equinox
|
||||
next_fall_equinox = next_autumnal_equinox
|
||||
next_autumn_equinox = next_autumnal_equinox
|
||||
previous_fall_equinox = previous_autumnal_equinox
|
||||
previous_autumn_equinox = previous_autumnal_equinox
|
||||
|
||||
# More general equinox/solstice functions
|
||||
def previous_equinox(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_equinox(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_solstice(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_solstice(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_new_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_new_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_first_quarter_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_first_quarter_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_full_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_full_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
def previous_last_quarter_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
def next_last_quarter_moon(date: _libastro._DateInitType) -> Date: ...
|
||||
|
||||
# Exceptions
|
||||
class CircumpolarError(ValueError): ...
|
||||
class NeverUpError(CircumpolarError): ...
|
||||
class AlwaysUpError(CircumpolarError): ...
|
||||
|
||||
# Observer class
|
||||
class Observer(_libastro.Observer):
|
||||
__slots__: list[str] = ["name"]
|
||||
|
||||
name: object
|
||||
|
||||
def copy(self) -> Self: ...
|
||||
__copy__ = copy
|
||||
def compute_pressure(self) -> None: ...
|
||||
def previous_transit(self, body: Body, start: _libastro._DateInitType | None = None) -> Date: ...
|
||||
def next_transit(self, body: Body, start: _libastro._DateInitType | None = None) -> Date: ...
|
||||
def previous_antitransit(self, body: Body, start: _libastro._DateInitType | None = None) -> Date: ...
|
||||
def next_antitransit(self, body: Body, start: _libastro._DateInitType | None = None) -> Date: ...
|
||||
def disallow_circumpolar(self, declination: float) -> None: ...
|
||||
def previous_rising(self, body: Body, start: _libastro._DateInitType | None = None, use_center: bool = False) -> Date: ...
|
||||
def previous_setting(self, body: Body, start: _libastro._DateInitType | None = None, use_center: bool = False) -> Date: ...
|
||||
def next_rising(self, body: Body, start: _libastro._DateInitType | None = None, use_center: bool = False) -> Date: ...
|
||||
def next_setting(self, body: Body, start: _libastro._DateInitType | None = None, use_center: bool = False) -> Date: ...
|
||||
def next_pass(
|
||||
self, body: EarthSatellite, singlepass: bool = True
|
||||
) -> tuple[Date | None, Date | None, Date | None, Date | None, Date | None, Date | None]: ...
|
||||
|
||||
# Time conversion functions
|
||||
def localtime(date: Date | float) -> _datetime: ...
|
||||
|
||||
class _UTC(_tzinfo):
|
||||
ZERO: _timedelta
|
||||
def tzname(self, dt: _datetime | None, /) -> NoReturn: ...
|
||||
def utcoffset(self, dt: _datetime | None) -> _timedelta: ...
|
||||
def dst(self, dt: _datetime | None) -> _timedelta: ...
|
||||
|
||||
UTC: _UTC
|
||||
|
||||
def to_timezone(date: Date | float, tzinfo: _tzinfo) -> _datetime: ...
|
||||
|
||||
# Coordinate classes
|
||||
class Coordinate:
|
||||
epoch: Date
|
||||
|
||||
@overload
|
||||
def __init__(self, body: Body, *, epoch: _libastro._DateInitType | None = None) -> None: ...
|
||||
@overload
|
||||
def __init__(self, coord1: float | str, coord2: float | str, *, epoch: _libastro._DateInitType | None = None) -> None: ...
|
||||
@overload
|
||||
def __init__(self, coord: Coordinate, *, epoch: _libastro._DateInitType | None = None) -> None: ...
|
||||
|
||||
class Equatorial(Coordinate):
|
||||
ra: Angle
|
||||
dec: Angle
|
||||
|
||||
def get(self) -> tuple[Angle, Angle]: ...
|
||||
def set(self, ra: float | str, dec: float | str) -> None: ...
|
||||
|
||||
to_radec = get
|
||||
from_radec = set
|
||||
|
||||
class LonLatCoordinate(Coordinate):
|
||||
lon: Angle
|
||||
lat: Angle
|
||||
|
||||
def set(self, lon: float | str, lat: float | str) -> None: ...
|
||||
def get(self) -> tuple[Angle, Angle]: ...
|
||||
@property
|
||||
def long(self) -> Angle: ...
|
||||
@long.setter
|
||||
def long(self, value: Angle) -> None: ...
|
||||
|
||||
class Ecliptic(LonLatCoordinate):
|
||||
def to_radec(self) -> tuple[Angle, Angle]: ...
|
||||
def from_radec(self, ra: float | str, dec: float | str) -> None: ...
|
||||
|
||||
class Galactic(LonLatCoordinate):
|
||||
def to_radec(self) -> tuple[Angle, Angle]: ...
|
||||
def from_radec(self, ra: float | str, dec: float | str) -> None: ...
|
||||
|
||||
# Backwards compatibility aliases
|
||||
date = Date
|
||||
angle = Angle
|
||||
LongLatCoordinate = LonLatCoordinate
|
||||
|
||||
# Catalog functions
|
||||
@overload
|
||||
def star(name: str, observer: Observer, /) -> FixedBody: ...
|
||||
@overload
|
||||
def star(name: str, when: _libastro._DateInitType, epoch: _libastro._DateInitType) -> FixedBody: ...
|
||||
def city(name: str) -> Observer: ...
|
||||
@@ -0,0 +1,379 @@
|
||||
from _typeshed import Unused
|
||||
from datetime import datetime as _datetime
|
||||
from typing import Final, NoReturn, Protocol, TypedDict, overload, type_check_only
|
||||
from typing_extensions import Self, TypeAlias, deprecated, disjoint_base
|
||||
|
||||
_DateInitType: TypeAlias = (
|
||||
Date
|
||||
| float
|
||||
| str
|
||||
| tuple[int]
|
||||
| tuple[int, int]
|
||||
| tuple[int, int, float]
|
||||
| tuple[int, int, float, float]
|
||||
| tuple[int, int, float, float, float]
|
||||
| tuple[int, int, float, float, float, float]
|
||||
| _datetime
|
||||
)
|
||||
|
||||
@type_check_only
|
||||
class _DateDescriptor:
|
||||
@overload
|
||||
def __get__(self, obj: None, objtype: type | None = None) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, objtype: type | None = None) -> Date: ...
|
||||
def __set__(self, obj: object, value: _DateInitType) -> None: ...
|
||||
|
||||
@type_check_only
|
||||
class _AngleDescriptorRadiansHours:
|
||||
@overload
|
||||
def __get__(self, obj: None, objtype: type | None = None) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, objtype: type | None = None) -> Angle: ...
|
||||
def __set__(self, obj: object, value: float | str) -> None: ...
|
||||
|
||||
@type_check_only
|
||||
class _AngleDescriptorRadiansDegrees:
|
||||
@overload
|
||||
def __get__(self, obj: None, objtype: type | None = None) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, objtype: type | None = None) -> Angle: ...
|
||||
def __set__(self, obj: object, value: float | str) -> None: ...
|
||||
|
||||
@type_check_only
|
||||
class _AngleDescriptorDegreesRadians:
|
||||
@overload
|
||||
def __get__(self, obj: None, objtype: type | None = None) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, objtype: type | None = None) -> Angle: ...
|
||||
@overload
|
||||
@deprecated("Do not pass Angle objects! The radian value will be incorrectly interpreted as degrees.")
|
||||
def __set__(self, obj: object, value: Angle) -> None: ...
|
||||
@overload
|
||||
def __set__(self, obj: object, value: float | str) -> None: ...
|
||||
|
||||
J2000: Final[float]
|
||||
MJD0: Final[float]
|
||||
earth_radius: Final[float]
|
||||
meters_per_au: Final[float]
|
||||
moon_radius: Final[float]
|
||||
sun_radius: Final[float]
|
||||
|
||||
@disjoint_base
|
||||
class Angle(float): # type: ignore[type-var]
|
||||
def __new__(cls, *args: Unused, **kwargs: Unused) -> NoReturn: ...
|
||||
@property
|
||||
def norm(self) -> Angle: ...
|
||||
@property
|
||||
def znorm(self) -> Angle: ...
|
||||
|
||||
class Date(float):
|
||||
@overload
|
||||
def __new__(cls) -> Date: ...
|
||||
@overload
|
||||
def __new__(cls, date: _DateInitType, /) -> Date: ...
|
||||
def triple(self) -> tuple[int, int, float]: ...
|
||||
def tuple(self) -> tuple[int, int, int, int, int, float]: ...
|
||||
def datetime(self) -> _datetime: ...
|
||||
|
||||
@disjoint_base
|
||||
class Observer:
|
||||
lat: _AngleDescriptorRadiansDegrees
|
||||
lon: _AngleDescriptorRadiansDegrees
|
||||
long: _AngleDescriptorRadiansDegrees
|
||||
elevation: float
|
||||
elev: float
|
||||
temp: float
|
||||
temperature: float
|
||||
pressure: float
|
||||
horizon: _AngleDescriptorRadiansDegrees
|
||||
epoch: _DateDescriptor
|
||||
date: _DateDescriptor
|
||||
|
||||
def __init__(self) -> None: ...
|
||||
def sidereal_time(self) -> Angle: ...
|
||||
def radec_of(self, az: float | str, alt: float | str) -> tuple[Angle, Angle]: ...
|
||||
|
||||
@disjoint_base
|
||||
class Body(Protocol):
|
||||
@property
|
||||
def name(self) -> str | None: ...
|
||||
@property
|
||||
def a_ra(self) -> Angle: ...
|
||||
@property
|
||||
def a_dec(self) -> Angle: ...
|
||||
@property
|
||||
def a_epoch(self) -> Date: ...
|
||||
@property
|
||||
def ra(self) -> Angle: ...
|
||||
@property
|
||||
def dec(self) -> Angle: ...
|
||||
@property
|
||||
def g_ra(self) -> Angle: ...
|
||||
@property
|
||||
def g_dec(self) -> Angle: ...
|
||||
@property
|
||||
def elong(self) -> Angle: ...
|
||||
@property
|
||||
def mag(self) -> float: ...
|
||||
@property
|
||||
def size(self) -> float: ...
|
||||
@property
|
||||
def radius(self) -> Angle: ...
|
||||
@property
|
||||
def alt(self) -> Angle: ...
|
||||
@property
|
||||
def az(self) -> Angle: ...
|
||||
@property
|
||||
def ha(self) -> Angle: ...
|
||||
@property
|
||||
def rise_time(self) -> Date | None: ...
|
||||
@property
|
||||
def rise_az(self) -> Angle | None: ...
|
||||
@property
|
||||
def transit_time(self) -> Date | None: ...
|
||||
@property
|
||||
def transit_alt(self) -> Angle | None: ...
|
||||
@property
|
||||
def set_time(self) -> Date | None: ...
|
||||
@property
|
||||
def set_az(self) -> Angle | None: ...
|
||||
@property
|
||||
def circumpolar(self) -> bool: ...
|
||||
@property
|
||||
def neverup(self) -> bool: ...
|
||||
def __init__(self, *args: Unused, **kwargs: Unused) -> None: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
@overload
|
||||
def compute(self, observer: Observer, /) -> None: ...
|
||||
@overload
|
||||
def compute(self, when: _DateInitType = ..., epoch: _DateInitType = ...) -> None: ...
|
||||
def copy(self) -> Self: ...
|
||||
def writedb(self) -> str: ...
|
||||
def parallactic_angle(self) -> Angle: ...
|
||||
|
||||
class Planet(Body, Protocol):
|
||||
@property
|
||||
def hlon(self) -> Angle: ...
|
||||
@property
|
||||
def hlat(self) -> Angle: ...
|
||||
@property
|
||||
def sun_distance(self) -> float: ...
|
||||
@property
|
||||
def earth_distance(self) -> float: ...
|
||||
@property
|
||||
def phase(self) -> float: ...
|
||||
@property
|
||||
def hlong(self) -> Angle: ...
|
||||
@overload
|
||||
def __init__(self, observer: Observer, /) -> None: ...
|
||||
@overload
|
||||
def __init__(self, when: _DateInitType, /, epoch: _DateInitType = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, *args: Unused, **kwargs: Unused) -> None: ...
|
||||
|
||||
@disjoint_base
|
||||
class Moon(Planet):
|
||||
@property
|
||||
def libration_lat(self) -> Angle: ...
|
||||
@property
|
||||
def libration_long(self) -> Angle: ...
|
||||
@property
|
||||
def colong(self) -> Angle: ...
|
||||
@property
|
||||
def moon_phase(self) -> float: ...
|
||||
@property
|
||||
def subsolar_lat(self) -> Angle: ...
|
||||
|
||||
@disjoint_base
|
||||
class Jupiter(Planet):
|
||||
@property
|
||||
def cmlI(self) -> Angle: ...
|
||||
@property
|
||||
def cmlII(self) -> Angle: ...
|
||||
|
||||
@disjoint_base
|
||||
class Saturn(Planet):
|
||||
@property
|
||||
def earth_tilt(self) -> Angle: ...
|
||||
@property
|
||||
def sun_tilt(self) -> Angle: ...
|
||||
|
||||
@disjoint_base
|
||||
class PlanetMoon(Protocol):
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def a_ra(self) -> Angle: ...
|
||||
@property
|
||||
def a_dec(self) -> Angle: ...
|
||||
@property
|
||||
def ra(self) -> Angle: ...
|
||||
@property
|
||||
def dec(self) -> Angle: ...
|
||||
@property
|
||||
def g_ra(self) -> Angle: ...
|
||||
@property
|
||||
def g_dec(self) -> Angle: ...
|
||||
@property
|
||||
def alt(self) -> Angle: ...
|
||||
@property
|
||||
def az(self) -> Angle: ...
|
||||
@property
|
||||
def x(self) -> float: ...
|
||||
@property
|
||||
def y(self) -> float: ...
|
||||
@property
|
||||
def z(self) -> float: ...
|
||||
@property
|
||||
def earth_visible(self) -> float: ...
|
||||
@property
|
||||
def sun_visible(self) -> float: ...
|
||||
@overload
|
||||
def __init__(self, observer: Observer, /) -> None: ...
|
||||
@overload
|
||||
def __init__(self, when: _DateInitType, /, epoch: _DateInitType = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, **kwargs: Unused) -> None: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
@overload
|
||||
def compute(self, observer: Observer, /) -> None: ...
|
||||
@overload
|
||||
def compute(self, when: _DateInitType = ..., epoch: _DateInitType = ...) -> None: ...
|
||||
def copy(self) -> Self: ...
|
||||
def writedb(self) -> str: ...
|
||||
def parallactic_angle(self) -> Angle: ...
|
||||
|
||||
class FixedBody(Body):
|
||||
name: str | None
|
||||
mag: float
|
||||
_spect: str
|
||||
_ratio: float
|
||||
_pa: _AngleDescriptorRadiansDegrees
|
||||
_epoch: _DateDescriptor
|
||||
_ra: _AngleDescriptorRadiansHours
|
||||
_dec: _AngleDescriptorRadiansDegrees
|
||||
_pmra: float
|
||||
_pmdec: float
|
||||
_class: str
|
||||
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class EllipticalBody(Planet):
|
||||
name: str | None
|
||||
_inc: _AngleDescriptorDegreesRadians
|
||||
_Om: _AngleDescriptorDegreesRadians
|
||||
_om: _AngleDescriptorDegreesRadians
|
||||
_M: _AngleDescriptorDegreesRadians
|
||||
_epoch_M: _DateDescriptor
|
||||
_epoch: _DateDescriptor
|
||||
_H: float
|
||||
_G: float
|
||||
_g: float
|
||||
_k: float
|
||||
_a: float
|
||||
_size: float
|
||||
_e: float
|
||||
|
||||
def __init__(self, *args: Unused, **kwargs: Unused) -> None: ...
|
||||
|
||||
class ParabolicBody(Planet):
|
||||
name: str | None
|
||||
_epoch: _DateDescriptor
|
||||
_epoch_p: _DateDescriptor
|
||||
_inc: _AngleDescriptorDegreesRadians
|
||||
_om: _AngleDescriptorDegreesRadians
|
||||
_Om: _AngleDescriptorDegreesRadians
|
||||
_q: float
|
||||
_g: float
|
||||
_k: float
|
||||
_size: float
|
||||
|
||||
def __init__(self, *args: Unused, **kwargs: Unused) -> None: ...
|
||||
|
||||
class HyperbolicBody(Planet):
|
||||
name: str | None
|
||||
_epoch: _DateDescriptor
|
||||
_epoch_p: _DateDescriptor
|
||||
_inc: _AngleDescriptorDegreesRadians
|
||||
_Om: _AngleDescriptorDegreesRadians
|
||||
_om: _AngleDescriptorDegreesRadians
|
||||
_e: float
|
||||
_q: float
|
||||
_g: float
|
||||
_k: float
|
||||
_size: float
|
||||
|
||||
def __init__(self, *args: Unused, **kwargs: Unused) -> None: ...
|
||||
|
||||
@disjoint_base
|
||||
class EarthSatellite(Body):
|
||||
name: str | None
|
||||
epoch: _DateDescriptor
|
||||
_epoch: _DateDescriptor
|
||||
_inc: _AngleDescriptorDegreesRadians
|
||||
_raan: _AngleDescriptorDegreesRadians
|
||||
_ap: _AngleDescriptorDegreesRadians
|
||||
_M: _AngleDescriptorDegreesRadians
|
||||
n: float
|
||||
inc: float
|
||||
raan: float
|
||||
e: float
|
||||
ap: float
|
||||
M: float
|
||||
decay: float
|
||||
drag: float
|
||||
orbit: float
|
||||
_n: float
|
||||
_e: float
|
||||
_decay: float
|
||||
_drag: float
|
||||
_orbit: int
|
||||
catalog_number: str | None
|
||||
|
||||
@property
|
||||
def sublat(self) -> Angle: ...
|
||||
@property
|
||||
def sublong(self) -> Angle: ...
|
||||
@property
|
||||
def elevation(self) -> float: ...
|
||||
@property
|
||||
def range(self) -> float: ...
|
||||
@property
|
||||
def range_velocity(self) -> float: ...
|
||||
@property
|
||||
def eclipsed(self) -> bool: ...
|
||||
|
||||
@type_check_only
|
||||
class _MoonPhases(TypedDict):
|
||||
new: Date
|
||||
full: Date
|
||||
|
||||
def builtin_planets() -> list[tuple[int, str, str]]: ...
|
||||
def degrees(angle: float | str, /) -> Angle: ...
|
||||
def hours(angle: float | str, /) -> Angle: ...
|
||||
def now() -> Date: ...
|
||||
def separation(
|
||||
obj1: tuple[float | str, float | str] | Body | Observer, obj2: tuple[float | str, float | str] | Body | Observer, /
|
||||
) -> Angle: ...
|
||||
def readdb(db_line: str, /) -> Body: ...
|
||||
def readtle(name: str, line1: str, line2: str, /) -> EarthSatellite: ...
|
||||
def unrefract(pressure: float, temperature: float, apparent_alt: float, /) -> Angle: ...
|
||||
def uranometria(ra: float | str, dec: float | str, /) -> int: ...
|
||||
def uranometria2000(ra: float | str, dec: float | str, /) -> int: ...
|
||||
def millennium_atlas(ra: float | str, dec: float | str, /) -> int: ...
|
||||
@overload
|
||||
def constellation(position: Body) -> tuple[str, str]: ...
|
||||
@overload
|
||||
def constellation(position: tuple[Angle | float, Angle | float], epoch: Date | float = ...) -> tuple[str, str]: ...
|
||||
def julian_date(date: _DateInitType | Observer = ..., /) -> float: ...
|
||||
def delta_t(date: _DateInitType | Observer = ..., /) -> float: ...
|
||||
def moon_phases(date: _DateInitType | Observer = ...) -> _MoonPhases: ...
|
||||
def eq_ecl(epoch: Date | float, ra: Angle | float, dec: Angle | float, /) -> tuple[Angle, Angle]: ...
|
||||
def ecl_eq(epoch: Date | float, lon: Angle | float, lat: Angle | float, /) -> tuple[Angle, Angle]: ...
|
||||
def eq_gal(epoch: Date | float, ra: Angle | float, dec: Angle | float, /) -> tuple[Angle, Angle]: ...
|
||||
def gal_eq(epoch: Date | float, glon: Angle | float, glat: Angle | float, /) -> tuple[Angle, Angle]: ...
|
||||
def precess(epoch1: Date | float, epoch2: Date | float, ra: Angle | float, dec: Angle | float, /) -> tuple[Angle, Angle]: ...
|
||||
def _next_pass(
|
||||
observer: Observer, body: Body, /
|
||||
) -> tuple[Date | None, Angle | None, Date | None, Angle | None, Date | None, Angle | None]: ...
|
||||
@@ -0,0 +1,5 @@
|
||||
from . import Observer
|
||||
|
||||
def city(name: str) -> Observer: ...
|
||||
def lookup(address: str) -> None: ...
|
||||
def lookup_with_geonames(q: str, username: str) -> Observer: ...
|
||||
@@ -0,0 +1,15 @@
|
||||
from typing import Final, overload
|
||||
|
||||
from . import FixedBody, Observer
|
||||
from ._libastro import _DateInitType
|
||||
|
||||
db: Final[str]
|
||||
stars: dict[str, FixedBody]
|
||||
|
||||
@overload
|
||||
def star(name: str, observer: Observer, /) -> FixedBody: ...
|
||||
@overload
|
||||
def star(name: str, when: _DateInitType = ..., epoch: _DateInitType = ...) -> FixedBody: ...
|
||||
|
||||
STAR_NUMBER_NAME: Final[dict[int, str]]
|
||||
STAR_NAME_NUMBER: Final[dict[str, int]]
|
||||
Reference in New Issue
Block a user