libera_utils.kernel_maker#
Module containing CLI tool for creating SPICE kernels from packets
Functions
Utility function to return an array of packet data from a list of file paths of raw JPSS APID 11 geolocation packet data files. |
|
|
Create a Libera Az-El CK from CCSDS packets or ASCII input files The C-kernel (CK) is the component of SPICE concerned with attitude of spacecraft structures or instruments. |
|
Create a JPSS CK from APID 11 CCSDS packets. |
Alpha function triggering kernel generation from manifest file. |
|
|
Create a JPSS SPK from APID 11 CCSDS packets. |
|
Create a SPICE kernel from a configuration file and input data. |
- libera_utils.kernel_maker.get_spice_packet_data_from_filepaths(packet_data_filepaths: list[str])#
Utility function to return an array of packet data from a list of file paths of raw JPSS APID 11 geolocation packet data files.
- Parameters:
- packet_data_filepathslist of str or cloudpathlib.anypath.AnyPath
The list of file paths to the raw packet data
- :returns: **packet_data – The configured packet data. See packets.py for more details on structure**
- :rtype: numpy.ndarray
- libera_utils.kernel_maker.make_azel_ck(parsed_args: Namespace)#
Create a Libera Az-El CK from CCSDS packets or ASCII input files The C-kernel (CK) is the component of SPICE concerned with attitude of spacecraft structures or instruments.
- Parameters:
parsed_args (argparse.Namespace) – Namespace of parsed CLI arguments
- Return type:
None
- libera_utils.kernel_maker.make_jpss_ck(parsed_args: Namespace)#
Create a JPSS CK from APID 11 CCSDS packets. The C-kernel (CK) is the component of SPICE concerned with attitude of spacecraft structures or instruments.
- Parameters:
parsed_args (argparse.Namespace) – Namespace of parsed CLI arguments
- Return type:
None
- libera_utils.kernel_maker.make_jpss_kernels_from_manifest(manifest_file_path: str, output_directory: str)#
Alpha function triggering kernel generation from manifest file.
If the manifest configuration field contains “start_time” and “end_time” fields then this function will select only packet data that falls in that range. If these are not given, then all packet data will be used.
- Parameters:
manifest_file_path (str or cloudpathlib.anypath.AnyPath) – Path to the manifest file that includes end_time and start_time in the configuration section
output_directory (str or cloudpathlib.anypath.AnyPath) – Path to save the completed kernels
- Returns:
output_directory – Path to the directory containing the completed kernels
- Return type:
- libera_utils.kernel_maker.make_jpss_spk(parsed_args: Namespace)#
Create a JPSS SPK from APID 11 CCSDS packets. The SPK system is the component of SPICE concerned with ephemeris data (position/velocity).
- Parameters:
parsed_args (argparse.Namespace) – Namespace of parsed CLI arguments
- Return type:
None
- libera_utils.kernel_maker.make_kernel(config_file: str, output_kernel: str, input_data: str = None, overwrite: bool = False, append: bool = False)#
Create a SPICE kernel from a configuration file and input data.
- Parameters:
config_file (str or pathlib.Path) – JSON configuration file defining how to create the kernel.
output_kernel (str or cloudpathlib.anypath.AnyPath) – Output directory or file to create the kernel. If a directory, the file name will be based on the config_file, but with the SPICE file extension.
input_data (str or pathlib.Path or pd.DataFrame, optional) – Input data file or object. Not required if defined within the config.
overwrite (bool, optional) – Option to overwrite an existing file.
append (bool, optional) – Option to append to an existing file.
- Returns:
Output kernel file path
- Return type: