<jupyter_start><jupyter_text>Rotations In USGSCSM Sensor ModelsIn USGSCSM, we primarily use quaternions and ocassionally use Euler angles. QuaternionsUSGSCSM sensor models always store the rotation from the sensor reference frame to the target reference frame as quaternions. The framing sensor model stores a single quaternion and the line scan sensor model stores a sequence of quaternions that are equally spaced across the duration of the image. Similar to ISIS sensor models, the line scan sensor model interpolates to get the rotation at any given time. Euler AnglesThe one place that the USGSCSM uses Euler angles is in pointing correction for the line scan sensor model. The line scan sensor model retains the original rotation quaternions and adds an additional bias rotation defined by a second degree polynomial for each Euler angle. In ISIS this is equivalent to the overexisting parameter in jigsaw. An ExampleLet's look at an MDIS NAC ISD<jupyter_code>with open('data/EN0213110924M.json') as fh:
    isd = json.load(fh)
print(isd)<jupyter_output><empty_output><jupyter_text>The rotation from the sensor reference frame to the target reference frame is stored in the `sensor_orientation` as `quaternions`. In order for the line scan sensor model and the frame sensor model, the quaternions are stored as a 2d list regardless of how many there are. Using the information from the MDIS-NAC ISD, rotate the look vector (7.168, 7.168, 550) from the sensor reference frame to the target reference frame<jupyter_code># Note that USGSCSM orders its quaternions the same as scipy, xi + yj + zk + w<jupyter_output><empty_output>