Skip to content

Commit

Permalink
Disable sbdb cache (#142)
Browse files Browse the repository at this point in the history
* Disable sbdb cache
  • Loading branch information
akoumjian authored Feb 5, 2025
1 parent b49e49a commit 6d0458e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/adam_core/coordinates/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

@jit
def _cartesian_to_spherical(
coords_cartesian: Union[np.ndarray, jnp.ndarray]
coords_cartesian: Union[np.ndarray, jnp.ndarray],
) -> jnp.ndarray:
"""
Convert a single Cartesian coordinate to a spherical coordinate.
Expand Down Expand Up @@ -179,7 +179,7 @@ def cartesian_to_spherical(coords_cartesian: np.ndarray) -> np.ndarray:

@jit
def _spherical_to_cartesian(
coords_spherical: Union[np.ndarray, jnp.ndarray]
coords_spherical: Union[np.ndarray, jnp.ndarray],
) -> jnp.ndarray:
"""
Convert a single spherical coordinate to a Cartesian coordinate.
Expand Down Expand Up @@ -258,7 +258,7 @@ def _spherical_to_cartesian(


def spherical_to_cartesian(
coords_spherical: Union[np.ndarray, jnp.ndarray]
coords_spherical: Union[np.ndarray, jnp.ndarray],
) -> jnp.ndarray:
"""
Convert spherical coordinates to Cartesian coordinates.
Expand Down
2 changes: 1 addition & 1 deletion src/adam_core/orbits/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def calc_orbit_class(
elements: Union[KeplerianCoordinates, CometaryCoordinates]
elements: Union[KeplerianCoordinates, CometaryCoordinates],
) -> np.ndarray:
"""
Calculate the orbital class for each Keplerian or Cometary orbit.
Expand Down
1 change: 1 addition & 0 deletions src/adam_core/orbits/query/sbdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def _get_sbdb_elements(obj_ids: List[str]) -> List[OrderedDict]:
List of dictionaries containing orbital elements and other object properties.
"""
results = []
SBDB.clear_cache() # Yikes!
for obj_id in obj_ids:
result = SBDB.query(
obj_id,
Expand Down

0 comments on commit 6d0458e

Please sign in to comment.