Skip to content

Commit

Permalink
fixed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlend committed Aug 23, 2024
1 parent 22b2a2c commit 564b092
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/apohele/mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from . import conversion, constants
from .time import Time
from .vector import Vector, Frames, CometElements
from .cache import cached_gzip_json_download
from .cache import download_json

from . import _core

Expand Down Expand Up @@ -494,7 +494,7 @@ def fetch_known_packed_designations(force_download=False):
Ceres has 4 entries, which all map to '00001'.
"""
# download the data from the MPC
packed_ids = cached_gzip_json_download(
packed_ids = download_json(
"https://minorplanetcenter.net/Extended_Files/mpc_ids_packed.json.gz",
force_download,
)
Expand Down Expand Up @@ -536,7 +536,7 @@ def fetch_known_designations(force_download=False):
Ceres has 4 entries, which all map to '1'.
"""
# download the data from the MPC
known_ids = cached_gzip_json_download(
known_ids = download_json(
"https://minorplanetcenter.net/Extended_Files/mpc_ids.json.gz",
force_download,
)
Expand Down Expand Up @@ -577,7 +577,7 @@ def fetch_known_packed_to_full_names(force_download=False):
Ceres has 4 entries, since it has 4 unique packed designations.
"""
orb = fetch_known_orbit_data(force_download=force_download)
packed_ids = cached_gzip_json_download(
packed_ids = download_json(
"https://minorplanetcenter.net/Extended_Files/mpc_ids_packed.json.gz",
force_download,
)
Expand Down Expand Up @@ -648,7 +648,7 @@ def fetch_known_orbit_data(url=None, force_download=False):
"""
if url is None:
url = "https://minorplanetcenter.net/Extended_Files/mpcorb_extended.json.gz"
objs = cached_gzip_json_download(url, force_download)
objs = download_json(url, force_download)
objects = []
for obj in objs:
# "Principal_design" is always a preliminary designation
Expand Down Expand Up @@ -691,7 +691,7 @@ def fetch_known_comet_orbit_data(force_download=False):
MPC. Object names are set to the packed normalized MPC representation.
"""
url = "https://minorplanetcenter.net/Extended_Files/cometels.json.gz"
objs = cached_gzip_json_download(url, force_download)
objs = download_json(url, force_download)
objects = []
for comet in objs:
name = pack_comet_designation(comet.get("Designation_and_name").split("(")[0])
Expand Down Expand Up @@ -841,7 +841,7 @@ class MPCObservation:
# Download the database of unnumbered observations from the MPC
url = "https://www.minorplanetcenter.net/iau/ECS/MPCAT-OBS/UnnObs.txt.gz"
path = apohele.data.cached_file_download(url)
path = apohele.data.download_file(url)
# Fetch all lines from the file which contain C51 (WISE) observatory code.
obs_code = "C51".encode()
Expand Down
4 changes: 2 additions & 2 deletions src/apohele/spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .time import Time
from . import _core
from .constants import AU_KM
from .cache import cached_file_download, cache_path
from .cache import download_file, cache_path
from .vector import Frames, State

__all__ = [
Expand Down Expand Up @@ -211,7 +211,7 @@ def kernel_fetch_from_url(url, force_download: bool = False):
"""
Download the target url into the cache folder of spice kernels.
"""
cached_file_download(url, force_download=force_download, subfolder="kernels")
download_file(url, force_download=force_download, subfolder="kernels")


def kernel_reload(filenames: Optional[list[str]] = None, include_cache=False):
Expand Down

0 comments on commit 564b092

Please sign in to comment.