planetmapper.data_loader

planetmapper.data_loader.make_data_path(filename: str) str[source]

Generates a path to a static data file.

Parameters:

filename – Filename of the data file stored in planetmapper/data

Returns:

Absolute path to the data file.

planetmapper.data_loader.get_ring_radii() dict[str, dict[str, list[float]]][source]

Load planetary ring radii from data file.

These ring radii values are sourced from https://nssdc.gsfc.nasa.gov/planetary/planetfact.html.

Returns:

Dictionary where the keys are planet names and the values are dictionaries containing ring data. These ring data dictionaries have keys corresponding to the names of the rings, and values with a list of ring radii in km. If the length of this list is 2, then the values give the inner and outer radii of the ring respectively. Otherwise, the length should be 1, meaning the ring has a single radius.

planetmapper.data_loader.get_ring_aliases() dict[str, str][source]

Load ring aliases from data file.

These are used to allow pure ASCII ring names to be used in functions such as planetmapper.Body.add_named_rings().

Returns:

Dictionary where the keys are variants of ring names (e.g. liberte) and the values are the ring names (e.g. liberté) in a format consistent with the ring names in get_ring_radii(). Note that the keys and values are all in lower case.