Skip to content

Commit

Permalink
Merge pull request #1104 from dirac-institute/Renaming-class-paramete…
Browse files Browse the repository at this point in the history
…r-de440s-to-planet_ephemeris

Renamed auxiliary config paramter de440s to planet_ephemeris
  • Loading branch information
Little-Ryugu authored Jan 17, 2025
2 parents 0bfc9cc + 135c391 commit 01b3540
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ For backwards compability and to enable new version of the files to be run as we


[AUXILIARY]
de440s = de440s.bsp
de440s_url = https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440s.bsp
planet_ephemeris = de440s.bsp
planet_ephemeris_url = https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440s.bsp

earth_predict = earth_200101_990827_predict.bpc
earth_predict_url = https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/earth_200101_990827_predict.bpc
Expand Down
24 changes: 13 additions & 11 deletions src/sorcha/utilities/sorchaConfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,10 @@ def _validate_expert_configs(self):
class auxiliaryConfigs:
"""Data class for holding auxiliary section configuration file keys and validating them."""

de440s: str = "de440s.bsp"
"""filename of de440s"""
de440s_url: str = "https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440s.bsp"
"""url for de4440s"""
planet_ephemeris: str = "de440s.bsp"
"""filename of planet_ephemeris"""
planet_ephemeris_url: str = "https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440s.bsp"
"""url for planet_ephemeris"""

earth_predict: str = "earth_200101_990827_predict.bpc"
"""filename of earth_predict"""
Expand Down Expand Up @@ -868,7 +868,7 @@ class auxiliaryConfigs:
def default_url(self):
"""returns a dictionary of the default urls used in this version of sorcha"""
return {
"de440s": self.__class__.de440s_url,
"planet_ephemeris": self.__class__.planet_ephemeris_url,
"earth_predict": self.__class__.earth_predict_url,
"earth_historical": self.__class__.earth_historical_url,
"earth_high_precision": self.__class__.earth_high_precision_url,
Expand All @@ -883,7 +883,7 @@ def default_url(self):
def default_filenames(self):
"""returns a dictionary of the default filenames used in this version"""
return {
"de440s": self.__class__.de440s,
"planet_ephemeris": self.__class__.planet_ephemeris,
"earth_predict": self.__class__.earth_predict,
"earth_historical": self.__class__.earth_historical,
"earth_high_precision": self.__class__.earth_high_precision,
Expand Down Expand Up @@ -934,7 +934,7 @@ def _create_lists_auxiliary_configs(self):
"""

self.urls = {
self.de440s: self.de440s_url,
self.planet_ephemeris: self.planet_ephemeris_url,
self.earth_predict: self.earth_predict_url,
self.earth_historical: self.earth_historical_url,
self.earth_high_precision: self.earth_high_precision_url,
Expand All @@ -946,7 +946,7 @@ def _create_lists_auxiliary_configs(self):
}

self.data_file_list = [
self.de440s,
self.planet_ephemeris,
self.earth_predict,
self.earth_historical,
self.earth_high_precision,
Expand All @@ -960,7 +960,7 @@ def _create_lists_auxiliary_configs(self):
]

self.data_files_to_download = [
self.de440s,
self.planet_ephemeris,
self.earth_predict,
self.earth_historical,
self.earth_high_precision,
Expand All @@ -976,7 +976,7 @@ def _create_lists_auxiliary_configs(self):
self.earth_historical,
self.earth_predict,
self.orientation_constants,
self.de440s,
self.planet_ephemeris,
self.earth_high_precision,
]

Expand Down Expand Up @@ -1487,7 +1487,9 @@ def PrintConfigsToLog(sconfigs, cmd_args):
"...the orientation information and physical constants for other bodies file is: "
+ str(sconfigs.auxiliary.orientation_constants)
)
pplogger.info("...the Earth's position for ephemerides file is: " + str(sconfigs.auxiliary.de440s))
pplogger.info(
"...the Earth's position for ephemerides file is: " + str(sconfigs.auxiliary.planet_ephemeris)
)
pplogger.info(
"...the regularly updated specification of the Earth's orientation file is: "
+ str(sconfigs.auxiliary.earth_high_precision)
Expand Down
4 changes: 2 additions & 2 deletions tests/sorcha/test_sorchaConfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def test_expertConfig_bool(key_name):
@pytest.mark.parametrize(
"file",
[
"de440s",
"planet_ephemeris",
"earth_predict",
"earth_historical",
"jpl_planets",
Expand All @@ -1015,7 +1015,7 @@ def test_auxiliary_config_url_given_filename_not(file):
@pytest.mark.parametrize(
"file",
[
"de440s",
"planet_ephemeris",
"earth_predict",
"earth_historical",
"jpl_planets",
Expand Down

0 comments on commit 01b3540

Please sign in to comment.