Config module
Contents
Config module¶
The config
module holds the Config
class and related default variables.
PDS_NAIF_MAPPING
¶
- geogen.config.PDS_NAIF_MAPPING = {-226800: ['RL', 'ROS_LANDER', 'PHILAE'], -652: ['MTM', 'BEPICOLOMBO MTM', 'MERCURY TRANSFER MODULE'], -248: ['VEX', 'VENUS EXPRESS', 'VENUS-EXPRESS', 'VENUS_EXPRESS'], -238: ['S1', 'SM1', 'SMART1', 'SMART-1'], -226: ['ROSETTA', 'ROS', 'ROSETTA ORBITER'], -143: ['TGO', 'TRACE GAS ORBITER', 'EXOMARS TGO', 'EXOMARS 2016 TGO'], -121: ['MPO', 'BEPICOLOMBO MPO', 'MERCURY PLANETARY ORBITER'], -41: ['MEX', 'MARS EXPRESS', 'MARS-EXPRESS', 'MARS_EXPRESS']}¶
Set dictionary variable mapping PDS instrument host ID with SPICE NAIF spacecraft body name and synonyms, and consequently defining allowed mission IDs in configuration file. For example: ‘Mercury Planetary Orbiter’ as instrument host/spacecraft name in PDS label will be translated into ‘MPO’, which becomes an allowed mission ID in the configuration file.
DEFAULT_DATA_DIR
¶
- geogen.config.DEFAULT_DATA_DIR = 'data'¶
Default output data directory is the data directory relative to from where GEOGEN is executed.
KERNELS_PATH_SYMBOL
¶
- geogen.config.KERNELS_PATH_SYMBOL = '$ESA_SPICE_KERNELS'¶
Symbol used in the Configuration file to specify the path of a mission metakernel file relative to path of the ESA’s SPICE Kernels Datasets (SKDs) top-level directory, which specified by the
ESA_SPICE_KERNELS
environment variable.
Config
class¶
- class geogen.config.Config(config_file, data_dir='data', addendum_dir='')[source]¶
Bases:
object
Class that represents a configuration to be used for computation.
It mainly allows to retrieve information from a Configuration File and load SPICE kernels.
Constructs Config object.
- Parameters
config_file (str) – Configuration file path.
data_dir (str, optional) – Data directory path (default is DEFAULT_DATA_DIR).
addendum_dir (str, optional) – Addendum directory path (default is the package data addendum directory).
- get_instrument(mission_id, instrument_id)[source]¶
Returns the instrument definition for a given mission ID and instrument ID.
- get_products(mission_id, instrument_id)[source]¶
Returns product types, definitions and default type for a given mission ID.
- get_product(mission_id, instrument_id, product_type)[source]¶
Returns the product definition and default type for a given mission ID, instrument ID and product type.
- get_product_class(mission_id, instrument_id, product_type)[source]¶
Returns the product class name for a given mission ID, instrument ID and product type.
- Parameters
- Returns
Product class name (see Instrument Product classes).
- Return type
- get_product_req_props(mission_id, instrument_id, product_type, pds_version='PDS3')[source]¶
Returns the product required properties for a given mission ID, instrument ID and product type.
- Parameters
- Returns
List of properties names, paths, and default product type.
- Return type
- load_kernels(spice_kernels)[source]¶
Load a list of SPICE kernels.
- Parameters
spice_kernels (List[str]) – List of SPICE kernels.
- get_kernels_reference_time(body_name)[source]¶
Get reference ephemeris time for a given SPICE body name.
Used by the GEOGEN CLI
fov
command.