For the upcoming AOS testing, we will have non-zero rotator angles. We need to be able to handle the `de-rotation`.
Demonstrate that the AOS comcam closed loop converges with the following test.
With our simulations, we can set `rotTelPos` to be 30 degrees, and keep `rotSkyPos` at zero. The definitions of these angles can be found at various places, one of them being https://sitcomtn-003.lsst.io/#camera-rotator . We can continue to use a few isolated star on each CCD like we've been doing so far. We want the stars to be in the same pixel coordinates as before, which requires a sky rotated by 30 degree compared to what we used before. That is, we rotate the input catalog by 30 degrees.
With the above settings, the WEP and OFC should work exactly like before. But we need to add an extra piece of code at the end of OFC. Once we finish calculating the control commands, these commands are in a coordinate system aligned with the pixel grid. We need to do a de-rotation, to put them back to the telescope Optical Coordinate System (see https://sitcomtn-003.lsst.io/ for exact Definition). The de-rotation code has been developed and given at https://sitcomtn-003.lsst.io/#camera-rotator . If it goes well, we just need to incorporate these into the OFC.
On the last step, closing the loop - my understand of the PhoSim perturbation interface is the perturbed surfaces are interpreted as always in the telescope Optical Coordinate System. So, after the above de-rotation, it should just work. If we run into problem with PhoSim here, we should be able to easily resolve that by adding a temporary fix (another rotation) external to PhoSim. This is unlikely needed.