Web¶
Note
The contents of this module are placed here for
organisational reasons. They should be imported from astrodynamics.utils
.
-
exception
astrodynamics.utils.web.
InvalidCategoryError
¶ Bases:
astrodynamics.utils.web.SPKDownloadError
Raised for invalid category.
-
exception
astrodynamics.utils.web.
KernelNotFoundError
¶ Bases:
astrodynamics.utils.web.SPKDownloadError
Raised when SPK kernel not found on website.
-
exception
astrodynamics.utils.web.
SPKDownloadError
¶ Bases:
Exception
Raised when SPK download fails.
-
astrodynamics.utils.web.
download_file_with_progress
(url, filepath)¶ Download URL to file with progress bar or spinner printed to stderr.
Parameters:
-
astrodynamics.utils.web.
download_spk
(category, kernel, download_dir=None)¶ Download generic kernel SPK files from http://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/
Parameters: - category – asteroids, comets, lagrange_point, planets, satellites, or stations
- kernel – Kernel name, e.g. de430 will download de430.bsp
- download_dir – Directory to download file to. By default, this is to a
platform-dependent astrodynamics directory:
SPK_DIR
-
astrodynamics.utils.web.
SPK_DIR
¶ Platform-specific directory based on
user_data_dir
from theappdirs
module.