From 117571fc4f850679b658e30e6cc59263d3f4801a Mon Sep 17 00:00:00 2001 From: Helge Eichhorn Date: Thu, 14 Nov 2024 13:57:02 +0100 Subject: [PATCH] fix: fix Python typings --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/lox-space/Cargo.toml | 2 +- crates/lox-space/lox_space.pyi | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f388d32d..9829ce6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -559,7 +559,7 @@ dependencies = [ [[package]] name = "lox-space" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" dependencies = [ "divan", "lox-bodies", diff --git a/Cargo.toml b/Cargo.toml index 4c29224f..e43e0f76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ lox-ephem = { path = "crates/lox-ephem", version = "0.1.0-alpha.1" } lox-io = { path = "crates/lox-io", version = "0.1.0-alpha.1" } lox-math = { path = "crates/lox-math", version = "0.1.0-alpha.2" } lox-orbits = { path = "crates/lox-orbits", version = "0.1.0-alpha.3" } -lox-space = { path = "crates/lox-space", version = "0.1.0-alpha.4" } +lox-space = { path = "crates/lox-space", version = "0.1.0-alpha.5" } lox-time = { path = "crates/lox-time", version = "0.1.0-alpha.1" } csv = "1.3.0" diff --git a/crates/lox-space/Cargo.toml b/crates/lox-space/Cargo.toml index 5e9a39a8..b2981fab 100644 --- a/crates/lox-space/Cargo.toml +++ b/crates/lox-space/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lox-space" description = "The Lox toolbox for space mission analysis and design" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" rust-version.workspace = true edition.workspace = true license.workspace = true diff --git a/crates/lox-space/lox_space.pyi b/crates/lox-space/lox_space.pyi index bbc5242e..6bddccc6 100644 --- a/crates/lox-space/lox_space.pyi +++ b/crates/lox-space/lox_space.pyi @@ -7,6 +7,11 @@ type Epoch = Literal["jd", "mjd", "j1950", "j2000"] type Unit = Literal["seconds", "days", "centuries"] type Vec3 = tuple[float, float, float] +class ElevationMask: + def __new__(cls, azimuth: np.ndarray, elevation: np.ndarray): ... + @classmethod + def fixed(cls, min_elevation: float) -> Self: ... + def find_events(func: Callable[[float], float], start: Time, times: list[float]): ... def find_windows( func: Callable[[float], float], start: Time, end: Time, times: list[float] @@ -14,7 +19,7 @@ def find_windows( def visibility( times: list[Time], gs: GroundLocation, - min_elevation: float, + mask: ElevationMask, sc: Trajectory, provider: UT1Provider, ): ...