adam_core.dynamics.moid module¶
Implementation of SGD-MOID
References
- [1] Hedo, J. M. et al. (2019). Minimum orbital intersection distance: an asymptotic approach.
Astronomy & Astrophysics, 633, A22. https://doi.org/10.1051/0004-6361/201936502
Algorithm 1: From an arbitrary point P_0 on the primary ellipse, project the point onto the plane of the other ellipse.
Then find the minimum distance from the projected point, using a minimization function.
Algorithm 2:
Divide up the primary ellipse into a series of points
For each point, run algorithm 1
3. After finding the point with the lowest distance, search for the overall minimum.
- class adam_core.dynamics.moid.PerturberMOIDs(table: Table, **kwargs: int | float | str)[source]¶
Bases:
Table- orbit_id¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- perturber¶
A column which represents an embedded quivr table.
- Parameters:
table_type – The type of the table to embed.
nullable – Whether the column can contain null values.
metadata – A dictionary of metadata to attach to the column.
- moid¶
A column for storing 64-bit floating point numbers.
- time¶
A column which represents an embedded quivr table.
- Parameters:
table_type – The type of the table to embed.
nullable – Whether the column can contain null values.
metadata – A dictionary of metadata to attach to the column.
- schema: ClassVar[pa.Schema] = orbit_id: large_string not null perturber: struct<code: large_string> child 0, code: large_string moid: double not null time: struct<days: int64, nanos: int64> child 0, days: int64 child 1, nanos: int64¶
- adam_core.dynamics.moid.project_point_on_plane(P0: ndarray[tuple[Any, ...], dtype[_ScalarT]], plane_coordinates: CartesianCoordinates) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]¶
Take a point P0 (from the secondary ellipse) and project it onto the plane of the primary ellipse.
- adam_core.dynamics.moid.coplanar_distance_to_ellipse(P: ndarray[tuple[Any, ...], dtype[_ScalarT]], keplerian_coordinates: KeplerianCoordinates, u: float) float[source]¶
Calculate the distance from point P on the plane to the ellipse.
- adam_core.dynamics.moid.minimize_distance_from_coplanar_point_to_ellipse(P: ndarray[tuple[Any, ...], dtype[_ScalarT]], keplerian_coordinates: KeplerianCoordinates)[source]¶
Find the minimum distance to the ellipse from planar point P
We only need the magnitude of the distance here to calculate distance from P0 to closest point on ellipse
- adam_core.dynamics.moid.distance_from_point_to_ellipse(P0: ndarray[tuple[Any, ...], dtype[_ScalarT]], P: ndarray[tuple[Any, ...], dtype[_ScalarT]], d_parallel: float) float[source]¶
Takes the parallel and perpendicular distances from the point to the ellipse and calculates the total distance
- adam_core.dynamics.moid.calculate_distance_from_point_to_ellipse(P0: ndarray[tuple[Any, ...], dtype[_ScalarT]], primary_ellipse: Orbits)[source]¶
Calculate the distance from point P0 (from first ellipse) to the closest point on the ellipse
- adam_core.dynamics.moid.calculate_moid_for_dt(primary_ellipse: Orbits, secondary_ellipse: Orbits, dt: float)[source]¶
- adam_core.dynamics.moid.calculate_moid(primary_ellipse: Orbits, secondary_ellipse: Orbits) tuple[float, Timestamp][source]¶
Calculate the Minimum Orbit Intersection Distance (MOID) between two orbits.
- adam_core.dynamics.moid.moid_worker(idx_chunk: ndarray[tuple[Any, ...], dtype[int64]], orbits: Orbits, perturber: OriginCodes) PerturberMOIDs[source]¶
Calculate the MOID for a chunk of orbits with respect to a perturbing body.
- adam_core.dynamics.moid.calculate_perturber_moids(orbits: Orbits, perturber: OriginCodes | List[OriginCodes], chunk_size: int = 100, max_processes: int | None = 1) PerturberMOIDs[source]¶
Calculate the minimum orbit intersection distance (MOID) for all orbits with respect to the perturbing body or bodies.
- Parameters:
orbits (Orbits) – The orbits to calculate the MOID for.
perturber (OriginCodes or List[OriginCodes]) – The perturbing body or bodies to calculate the MOID for.
chunk_size (int, optional) – The number of orbits to process in each chunk, by default 100.
max_processes (int, optional) – The maximum number of processes to use, by default 1.
- Returns:
A table containing the MOID and time for each orbit with respect to the perturbing body or bodies.
- Return type: