libera_utils.kernel_maker.write_kernel_input_file#

libera_utils.kernel_maker.write_kernel_input_file(data: ndarray, filepath: str, fields: list = None, fmt: str = '%.16f')#

Write ephemeris and attitude data to MKSPK and MSOPCK input data files, respectively.

See MSOPCK documentation here:

https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/ug/msopck.html

See MKSPK documentation here:

https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/ug/mkspk.html

Parameters:
  • data (numpy.ndarray) – Structured array (named, with data types) of attitude or ephemeris data.

  • filepath (str or pathlib.Path) – Filepath to write to.

  • fields (list) – Optional. List of field names to write out to the data file. If not specified, assume fields are already in the proper order.

  • fmt (str or list) – Format specifier(s) to pass to np.savetxt. Default is to assume everything should be floats with 16 decimal places of precision (%.16f). If a list is passed, it must contain a format specifier for each column in data.

Returns:

Absolute path to written file.

Return type:

pathlib.Path