Utility Functions
Utility functions for the satkit package
API Reference
Utility functions for SatKit
- satkit.utils.build_date()
Return build date of this satkit library as a string
Returns:
strBuild date of this satkit library
- satkit.utils.datadir()
Return directory currently used to hold necessary data files for the directory
Data directory is 1st of following directories search that contains the data files listed in “update_datafiles”
MacOS:
Directory pointed to by
SATKIT_DATAenvironment variable$DYLIB/satkit-datawhere$DYLIBis location of compiled python satkit library$HOME/LIBRARY/Application Support/satkit-data$HOME/.astro-data$HOME/usr/share/astro-data/Library/Application Support/astro-data
Linux:
Directory pointed to by
SATKIT_DATAenvironment variable$DYLIB/satkit-datawhere$DYLIBis location of compiled python satkit library$HOME/.astro-data$HOME/usr/share/astro-data
Windows:
Directory pointed to by
SATKIT_DATAenvironment variable$DYLIB/satkit-datawhere$DYLIBis location of compiled python satkit library$HOME/.astro-data$HOME
- satkit.utils.datafiles_exist()
Check if data files are found
- Returns:
- True if data files are found
False if data files are not found
- Return type:
bool
- satkit.utils.dylib_path()
Location of the compiled library
- Returns:
Path to the compiled library
- Return type:
str
- satkit.utils.githash()
Return git hash of this satkit build
Returns:
strGit hash of this satkit build
- satkit.utils.set_datadir(datadir)
Set the data directory
- Parameters:
datadir (str) – Path to the data directory
- Returns:
None
- Raises:
RuntimeError – If the directory does not exist
- satkit.utils.update_datafiles(**kwds)
Download & store data files needed for “satkit” computations
- Keyword Arguments:
overwrite (bool) – Download and overwrite files if they already exist
dir (string) – Target directory for files. Uses existing data directory if not specified. (see “datadir” function)
Notes
Files include:
EGM96.gfc: EGM-96 Gravity Model CoefficientsJGM3.gfc: JGM-3 Gravity Model CoefficientsJGM2.gfc: JGM-2 Gravity Model CoefficientsITU_GRACE16.gfc: ITU Grace 16 Gravitytab5.2a.txt: Coefficients for GCRS to GCRF conversiontab5.2b.txt: Coefficients for GCRS to GCRF conversiontab5.2d.txt: Coefficients for GCRS to GCRF conversionSW-ALL.csv: Space weather data, updated dailyleap-seconds.txt: Leap seconds (UTC vs TAI)EOP-All.csv: Earth orientation parameters, updated dailylinux_p1550p2650.440: JPL Ephemeris version 440 (~ 100 MB)
The space weather and earth orientation parameters files are updated
daily and will always be downloaded regardless of the overwrite flag
- satkit.utils.version()
Return version of this satkit library as a string
Returns:
strVersion of this satkit library