create_meta_kernel

Functions

_split_kernel_path_str(abspath[, split])

If abspath string is longer than 77 chars, split it up in the meta kernel by inserting "+',

build_meta_kernel_file(→ None)

Builds a specific text file that will be fed into spiceypy that defines

_build_file_name(→ str)

Given a string defining the cache directory, and a string defining the full

Module Contents

_split_kernel_path_str(abspath: str, split=77)[source]

If abspath string is longer than 77 chars, split it up in the meta kernel by inserting “+’, ‘”.

77 is the default because the character limit in SPICE is 80 before the string needs split.

abspath: str

The filepath string that needs split.

Splitint

The maximum size each part of the filepath can be before it needs split.

abspath : str The filepath string split into chunks of required size.

build_meta_kernel_file(auxconfigs: layup.utilities.layup_configs.AuxiliaryConfigs, retriever: pooch.Pooch, downloader=None) None[source]

Builds a specific text file that will be fed into spiceypy that defines the list of spice kernel to load, as well as the order to load them.

Parameters:
  • auxconfigs (AuxiliaryConfigs) – Dataclass of auxiliary configuration file arguments.

  • retriever (pooch) – Pooch object that maintains the registry of files to download

  • downloader (callable, optional) – pooch downloader to use for any file that still needs fetching (passed to Pooch.fetch). Defaults to None (pooch’s default downloader). Callers pass layup_downloader() for the fail-fast timeout (issue #388).

Return type:

None

_build_file_name(cache_dir: str, file_path: str) str[source]

Given a string defining the cache directory, and a string defining the full path to a given file. This function will strip out the cache directory from the file path and replace it with the required meta_kernel directory substitution character.

Parameters:
  • cache_dir (string) – The full path to the cache directory used when retrieving files for Assist and Rebound.

  • file_path (string) – The full file path for a given file that will have the cache directory segment replace.

Returns:

Shortened file path, appropriate for use in kernel_meta files.

Return type:

string