curryer.kernels.create

SPICE kernel creation wrapper.

@author: Brandon Stone

Attributes

Classes

KernelCreator

Class used to create kernels.

Functions

batch_kernels(kernel_configs[, output_kernels, ...])

Create SPICE kernels.

Module Contents

curryer.kernels.create.logger
class curryer.kernels.create.KernelCreator(overwrite=False, append=False, bin_dir: pathlib.Path = None, parent_dir: pathlib.Path = None)

Class used to create kernels.

_overwrite = False
_append = False
_bin_dir = None
_parent_dir = None
find_bin_dir(exe: str = 'mkspk')
static find_class(class_path)

Convert a class path string to an imported object.

load_input_data(input_obj, parent_dir: pathlib.Path = None, input_columns: dict = None)
load_writer(properties: curryer.kernels.classes.AbstractKernelProperties, parent_dir: pathlib.Path = None)
write(properties: curryer.kernels.classes.AbstractKernelProperties, output_kernel: pathlib.Path, input_data, input_columns=None)
write_from_json(properties_file: pathlib.Path, output_kernel: pathlib.Path = None, input_data=None, input_columns=None, overrides=None)
curryer.kernels.create.batch_kernels(kernel_configs, output_kernels=None, time_range=None, time_format='utc', buffer_hours=0, lag_days=None, overwrite=False, append=False)

Create SPICE kernels.

The mission, data source (accessor) and kernel properties are defined in a JSON file.

Parameters:
  • kernel_configs (list[str or Path]) – One or more kernel creation properties (JSON file).

  • output_kernels (list[str or Path], optional) – File to save the kernel as. Default is to use the kernel_config, but with the appropriate file extension. Must be None if more than one kernel config is given.

  • time_range (iter of (str or int), optional) – Time range of data to write to the kernel (exclusive end). Default is to write all available data.

  • time_format (str, optional) – Time format code (ttype) of time_range. Default=”utc”.

  • buffer_hours (float or list[float], optional) – Option to buffer time_range, in hours. Default=0.

  • lag_days (int, optional) – Define the time_range to be a 24-hour window starting lag_days days prior to the start of the current day (UTC).

  • overwrite (bool, optional) – Overwrite an existing file.

  • append (bool, optional) – Append to an existing file.

Returns:

The output kernel files, same as output_kernels if it was given.

Return type:

list[str or Path]