curryer.kernels.attitude ======================== .. py:module:: curryer.kernels.attitude .. autoapi-nested-parse:: attitude @author: Brandon Stone Attributes ---------- .. autoapisummary:: curryer.kernels.attitude.logger curryer.kernels.attitude.PROPERTIES_TO_WRITER Classes ------- .. autoapisummary:: curryer.kernels.attitude.AttitudeTypes curryer.kernels.attitude.AttitudeInputDataTypes curryer.kernels.attitude.AttitudeWriterTimeTypes curryer.kernels.attitude.AttitudeAngularRateTypes curryer.kernels.attitude.AbstractAttitudeProperties curryer.kernels.attitude.AttitudeQuaternionProperties curryer.kernels.attitude.AttitudeEulerProperties curryer.kernels.attitude.AttitudeWriter Module Contents --------------- .. py:data:: logger .. py:class:: AttitudeTypes(*args, **kwds) Bases: :py:obj:`enum.Enum` Attitude kernel types. Note: `msopck` only supports types 1, 2 & 3. .. py:attribute:: DISCRETE_QUAT_AND_RATE :value: 1 .. py:attribute:: CONTINUOUS_QUAT_AND_FIXED_RATE :value: 2 .. py:attribute:: LINEAR_QUAT :value: 3 .. py:attribute:: POLYNOMIAL_QUAT_AND_OPTIONAL_RATE :value: 4 .. py:class:: AttitudeInputDataTypes(*args, **kwds) Bases: :py:obj:`enum.Enum` Attitude input data types. .. py:attribute:: SPICE_QUAT :value: 'SPICE QUATERNIONS' .. py:attribute:: MSOP_QUAT :value: 'MSOP QUATERNIONS' .. py:attribute:: FLIPSIGN_QUAT :value: 'FLIP SPICE QUATERNIONS' .. py:attribute:: EULER_ANGLES :value: 'EULER ANGLES' .. py:class:: AttitudeWriterTimeTypes(*args, **kwds) Bases: :py:obj:`enum.Enum` Attitude writer time types. .. py:attribute:: SCLK :value: 'SCLK' .. py:attribute:: UTC :value: 'UTC' .. py:attribute:: TICKS :value: 'TICKS' .. py:attribute:: DSCLK :value: 'DSCLK' .. py:attribute:: ET :value: 'ET' .. py:class:: AttitudeAngularRateTypes(*args, **kwds) Bases: :py:obj:`enum.Enum` Attitude angular rate types. .. py:attribute:: PRESENT :value: 'YES' .. py:attribute:: NOT_PRESENT :value: 'NO' .. py:attribute:: MAKE_UP_AVG :value: 'MAKE UP' .. py:attribute:: MAKE_UP_NO_AVG :value: 'MAKE UP/NO AVERAGING' .. py:class:: AbstractAttitudeProperties Bases: :py:obj:`curryer.kernels.classes.AbstractKernelProperties` Attitude kernel common properties. .. py:attribute:: SUPPORTED_INPUT_DATA_TYPES :type: ClassVar :value: None .. py:attribute:: input_body :type: curryer.spicierpy.obj.AnyBodyOrFrame :value: None .. py:attribute:: input_frame :type: curryer.spicierpy.obj.Frame :value: None .. py:attribute:: input_time_type :type: str :value: 'ugps' .. py:attribute:: input_data_type :type: curryer.kernels.classes.TypedDataDescriptor .. py:attribute:: input_angular_rate :type: curryer.kernels.classes.TypedDataDescriptor .. py:attribute:: input_time_columns :type: list[str] :value: ['ugps'] .. py:attribute:: input_data_columns :type: list[str] :value: None .. py:attribute:: input_rate_columns :type: list[str] :value: ['rate_x', 'rate_y', 'rate_z'] .. py:attribute:: ck_type :type: curryer.kernels.classes.TypedDataDescriptor .. py:attribute:: down_sample_tolerance :type: float :value: None .. py:attribute:: leapsecond_kernel :type: str :value: None .. py:attribute:: frame_kernel :type: str :value: None .. py:attribute:: clock_kernel :type: str :value: None .. py:attribute:: create_clock :type: bool :value: False .. py:attribute:: writer_time_type :type: curryer.kernels.classes.TypedDataDescriptor .. py:method:: __post_init__() .. py:method:: to_dict() Convert the properties class to a dict for creating kernels. .. py:class:: AttitudeQuaternionProperties Bases: :py:obj:`AbstractAttitudeProperties` Attitude quaternion kernel properties. .. py:attribute:: SUPPORTED_INPUT_DATA_TYPES :type: ClassVar .. py:attribute:: input_data_columns :type: list[str] :value: ['quaternion_c', 'quaternion_x', 'quaternion_y', 'quaternion_z'] .. py:class:: AttitudeEulerProperties Bases: :py:obj:`AbstractAttitudeProperties` Attitude euler angle kernel properties. .. py:attribute:: SUPPORTED_INPUT_DATA_TYPES :type: ClassVar .. py:attribute:: input_data_type :type: curryer.kernels.classes.TypedDataDescriptor .. py:attribute:: input_rotations_order :type: list[str] :value: ['X', 'Y', 'Z'] .. py:attribute:: input_rotations_type :type: str :value: 'SPACE' .. py:attribute:: input_angle_units :type: str :value: 'DEGREES' .. py:attribute:: input_data_columns :type: list[str] :value: ['angle_x', 'angle_y', 'angle_z'] .. py:method:: to_dict() Convert the properties class to a dict for creating kernels. .. py:class:: AttitudeWriter(properties: AbstractAttitudeProperties, **kwargs) Bases: :py:obj:`curryer.kernels.classes.AbstractKernelWriter` Create or append to a SPICE attitude (CK) kernel. .. rubric:: Notes Kernel configuration arguments set by this class: - TODO .. py:attribute:: KTYPE :value: 'ck' .. py:attribute:: FILE_EXT :value: '.bc' .. py:attribute:: properties .. py:method:: prepare_input_data(input_data: pandas.DataFrame) -> list[pandas.DataFrame] Prepare an accessor that will provide input data for the kernel. .. py:method:: write_input_data(fobj_or_str, input_data: pandas.DataFrame) Write input data. .. py:method:: _write_kernel(setup_file, input_file, kernel_file, append=False) Setup the command to create a "CK" kernel using the external tool "msopck". :param setup_file: Setup file containing kernel creation properties (see "msopck"). :type setup_file: str :param input_file: Input data file to create kernel from. :type input_file: str :param kernel_file: Kernel filename to create. :type kernel_file: str :param append: Not supported by msopck (auto-appends). Public wrappers methods add support for not appending. :type append: bool, optional :returns: List of subprocess commands and arguments. :rtype: list of str .. py:data:: PROPERTIES_TO_WRITER