create_callable_orientation

giant.utilities.spice_interface:

giant.utilities.spice_interface.create_callable_orientation(from_frame, to_frame)[source]

This function generates a partial function of the pxform function from spice with the from and the to frames specified.

This function can only be used if the spiceypy package is installed and available for the current python implementation. The resulting callable from this method will return the rotation to go from frame from_frame to frame to_frame at time et as an Rotation object.

Calls to the output from this function are equivalent to

>>> import giant.rotations as at
>>> import spiceypy
>>> et = 5.23
>>> rot = Rotation(spiceypy.pxform(from_frame, to_frame, et))

where et is the input you pass to the result from this function

Parameters:
  • from_frame (str) – The NAIF frame name of the reference frame

  • to_frame (str) – The NAIF frame name of the target frame for the transformation

Returns:

A partial function wrapper around the spiceypy.pxform function which only requires the et input

Return type:

Callable