This task should consider how to deal with the condition that PhoSim does not rotate the optical system correctly:
Closed-Loop Simulation with Non-Zero Camera Rotation Angle.
For the de-rotation of correction in OFC, the initial implementation is in:
camrot.py. However, it could not be verified because of the PhoSim problem mentioned above.
The following is the record of email discussion with John:
-----------------------------------------------------------------
> On Aug 9, 2019, at 11:30 AM, Te-Wei Tsai <ttsai@lsst.org> wrote:
>
> Hi John,
>
> Thank you for your kind and clear explanation!
>
> I have some questions for the second effect.
>
> 1. Although the lens will not rotate relative to the focal plane, how much will it affect the accuracy of OPD compared with the condition if we just rotate the OPD directly? Will the difference be as small as less than 5 %? When I play the lens on the optical table before, I only see little difference actually. My experiment before is pretty sensitive and measures the current magnitude in the nA level. But I should admit that is in a different field, not telescope.
Tei-Wei-
I don’t know the answer, for sure, but I think this would be a significant effect. I think the fact that focal plane would probably be more important than the lenses and a camera tilt would be one degree of freedom, for instance, would then affect the OPD in a way that is different than a simple rotation of the other things. So it would even be more complicate than the OPD rotating a pattern one way due to the mirrors, and another way due to the camera. In other words, by doing a simple rotation of the OPDs you would be assuming that the entire camera is always perfectly located, which clearly a bad assumption.
I’d be happy to implement this, but I need some funding to do it.
> 2. What we cared about now is to rotate the camera only and check the OPD or donuts. Not the spider and tracking. Why do you feel these two are important?
>
Yeah, these two would not affect the OPDs significantly, although there could be some subtle effects. They are more important in looking at diffraction spikes, astrometry of sources, ellipticity near the edge of the field, etc.
john
> Could you help to answer these questions?
>
> Thank you!
>
> Te-Wei Tsai
> On 8/9/2019 6:44 AM, John Peterson wrote:
>>
>> Te-Wei & Bo-
>>
>> I investigated this further. The two angles work as follows: 1) rotskypos rotates the sky with respect to the camera, 2) rottelpos rotates the rest of LSST (mirrors, spider) with respect to the camera. Thus, rotskypos would rotate the opds around the focal plane (as you have seen), whereas rottelpos would rotate the OPD patterns around their individual centers. However the second effect isn’t fully in phosim. There is the correct rotation of the spider & also tracking rotation is done correctly, but not the mirrors shapes relative to the camera which would give you the effect you should see on the OPDs. It wouldn’t be as simple as rotating the OPDs individually, because the lenses don’t rotate with respect to the focal plane.
>>
>> I am happy to implement this and get the system engineering repos fixed up, but I really need a contract to dive into this as OPDs & sys eng data are not even in the public version (hence, cc’ing Steve & Victor).
>>
>> Best Regards,
>>
>> John
>>
>>
>>
>>> On Aug 8, 2019, at 11:11 AM, Te-Wei Tsai <ttsai@lsst.org> wrote:
>>>
>>> Hi John,
>>>
>>> Please let me answer this question. The images are (1) rotskypos = rottelpos = 0, (2) rotskypos = 45, rottelpos = 0, and (3) rotskypos = 0, rottelpos = 45 from the left to right (R22_S11 is used).
>>>
>>> <imgRotMultiDonut.png>
>>>
>>> We are worried about we have no idea which command we should use in PhoSim to rotate the OPD image correctly. Although we could rotate the OPD by ourselves, it should be nice and helpful that the PhoSim has provided the related function to use.
>>>
>>> Thank you!
>>>
>>>
>>> Te-Wei Tsai
>>> On 8/8/19 7:58 AM, John Peterson wrote:
>>>>
>>>> Bo-
>>>>
>>>> well one of the angles should rotate around the focal plane (apparently, that is rotskypos) and then the other should rotate the opd image around. I can’t tell from the images you sent whether that is happening or not? Can you tell?
>>>>
>>>> I am worried that the second isn’t implemented fully.
>>>>
>>>> john
>>>>
>>>>> On Aug 2, 2019, at 1:35 AM, Bo Xin <bxin@lsst.org> wrote:
>>>>>
>>>>> Hi John and Te-Wei,
>>>>>
>>>>> According to this figure (attached, or can be found on this page
>>>>> https://confluence.lsstcorp.org/display/LTS/Closed-Loop+Simulation+with+Non-Zero+Camera+Rotation+Angle#/
>>>>> ) rottelpos seems not doing anything to the images on the CCD.
>>>>> Can you help me understand why?
>>>>>
>>>>> The real question is - In PhoSim, if I want to keep everything else same, only to add a rotation to the camera rotator, what command should I use?
>>>>>
>>>>> Thanks!
>>>>> Bo
>>>>>
>>>>>
>>>>> <image.png>
>>>>>
>>>>> On Tue, Jul 30, 2019 at 7:01 AM John Peterson <peters11@purdue.edu> wrote:
>>>>>
>>>>>
>>>>> Te-Wei-
>>>>>
>>>>> i believe “rottelpos” is what you need.
>>>>>
>>>>> You can find more here:
>>>>>
>>>>> https://bitbucket.org/phosim/phosim_release/wiki/Instance%20Catalog
>>>>>
>>>>> there is a lot new documentation in the past few months, so follow the links around.
>>>>>
>>>>> Regards,
>>>>>
>>>>> John
>>>>>
>>>>>
>>>>>
>>>>>> On Jul 29, 2019, at 11:46 AM, Te-Wei Tsai <TTsai@lsst.org> wrote:
>>>>>>
>>>>>> Hi John,
>>>>>>
>>>>>> May I know is there any instance command I can use in PhoSim to rotate the camera instead of sky?
>>>>>>
>>>>>> I knew there is a rotskypos instance command to rotate the sky. However, the optical system (optical path difference, OPD) keeps the same. This means the wavefront error calculated from the defocal image keeps the same between rotskypos=30 and rotskypos=0, for example. (I used the central donut image, which has the field position of (0, 0)).
>>>>>>
>>>>>> The reason for this is because I am dealing with the camera image that has a non-zero rotation angle now. You could imagine that the calculated OPD based on the CCD eimage should be rotated as well because of the readout x, y direction of CCD has been rotated.
>>>>>>
>>>>>> If there is no such camera rotation command in PhoSim, I could rotate the image by myself also. However, I am not sure if the rotskypos=30 and the sky rotates 30 degree, the OPD on camera by CCD eimage should rotate 30 or -30 or other angles. May I have some comments from you?
>>>>>>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Te-Wei Tsai
>>>>>>
>>>>>> Software engineer, LSST T&S team
>>>>>>
>>>>>
>>>>
>>
This task should consider how to deal with the condition that PhoSim does not rotate the optical system correctly:
Closed-Loop Simulation with Non-Zero Camera Rotation Angle.
For the de-rotation of correction in OFC, the initial implementation is in:
camrot.py. However, it could not be verified because of the PhoSim problem mentioned above.
The following is the record of email discussion with John:
-----------------------------------------------------------------
> On Aug 9, 2019, at 11:30 AM, Te-Wei Tsai <ttsai@lsst.org> wrote:
>
> Hi John,
>
> Thank you for your kind and clear explanation!
>
> I have some questions for the second effect.
>
> 1. Although the lens will not rotate relative to the focal plane, how much will it affect the accuracy of OPD compared with the condition if we just rotate the OPD directly? Will the difference be as small as less than 5 %? When I play the lens on the optical table before, I only see little difference actually. My experiment before is pretty sensitive and measures the current magnitude in the nA level. But I should admit that is in a different field, not telescope.
Tei-Wei-
I don’t know the answer, for sure, but I think this would be a significant effect. I think the fact that focal plane would probably be more important than the lenses and a camera tilt would be one degree of freedom, for instance, would then affect the OPD in a way that is different than a simple rotation of the other things. So it would even be more complicate than the OPD rotating a pattern one way due to the mirrors, and another way due to the camera. In other words, by doing a simple rotation of the OPDs you would be assuming that the entire camera is always perfectly located, which clearly a bad assumption.
I’d be happy to implement this, but I need some funding to do it.
> 2. What we cared about now is to rotate the camera only and check the OPD or donuts. Not the spider and tracking. Why do you feel these two are important?
>
Yeah, these two would not affect the OPDs significantly, although there could be some subtle effects. They are more important in looking at diffraction spikes, astrometry of sources, ellipticity near the edge of the field, etc.
john
> Could you help to answer these questions?
>
> Thank you!
>
> Te-Wei Tsai
> On 8/9/2019 6:44 AM, John Peterson wrote:
>>
>> Te-Wei & Bo-
>>
>> I investigated this further. The two angles work as follows: 1) rotskypos rotates the sky with respect to the camera, 2) rottelpos rotates the rest of LSST (mirrors, spider) with respect to the camera. Thus, rotskypos would rotate the opds around the focal plane (as you have seen), whereas rottelpos would rotate the OPD patterns around their individual centers. However the second effect isn’t fully in phosim. There is the correct rotation of the spider & also tracking rotation is done correctly, but not the mirrors shapes relative to the camera which would give you the effect you should see on the OPDs. It wouldn’t be as simple as rotating the OPDs individually, because the lenses don’t rotate with respect to the focal plane.
>>
>> I am happy to implement this and get the system engineering repos fixed up, but I really need a contract to dive into this as OPDs & sys eng data are not even in the public version (hence, cc’ing Steve & Victor).
>>
>> Best Regards,
>>
>> John
>>
>>
>>
>>> On Aug 8, 2019, at 11:11 AM, Te-Wei Tsai <ttsai@lsst.org> wrote:
>>>
>>> Hi John,
>>>
>>> Please let me answer this question. The images are (1) rotskypos = rottelpos = 0, (2) rotskypos = 45, rottelpos = 0, and (3) rotskypos = 0, rottelpos = 45 from the left to right (R22_S11 is used).
>>>
>>> <imgRotMultiDonut.png>
>>>
>>> We are worried about we have no idea which command we should use in PhoSim to rotate the OPD image correctly. Although we could rotate the OPD by ourselves, it should be nice and helpful that the PhoSim has provided the related function to use.
>>>
>>> Thank you!
>>>
>>>
>>> Te-Wei Tsai
>>> On 8/8/19 7:58 AM, John Peterson wrote:
>>>>
>>>> Bo-
>>>>
>>>> well one of the angles should rotate around the focal plane (apparently, that is rotskypos) and then the other should rotate the opd image around. I can’t tell from the images you sent whether that is happening or not? Can you tell?
>>>>
>>>> I am worried that the second isn’t implemented fully.
>>>>
>>>> john
>>>>
>>>>> On Aug 2, 2019, at 1:35 AM, Bo Xin <bxin@lsst.org> wrote:
>>>>>
>>>>> Hi John and Te-Wei,
>>>>>
>>>>> According to this figure (attached, or can be found on this page
>>>>> https://confluence.lsstcorp.org/display/LTS/Closed-Loop+Simulation+with+Non-Zero+Camera+Rotation+Angle#/
>>>>> ) rottelpos seems not doing anything to the images on the CCD.
>>>>> Can you help me understand why?
>>>>>
>>>>> The real question is - In PhoSim, if I want to keep everything else same, only to add a rotation to the camera rotator, what command should I use?
>>>>>
>>>>> Thanks!
>>>>> Bo
>>>>>
>>>>>
>>>>> <image.png>
>>>>>
>>>>> On Tue, Jul 30, 2019 at 7:01 AM John Peterson <peters11@purdue.edu> wrote:
>>>>>
>>>>>
>>>>> Te-Wei-
>>>>>
>>>>> i believe “rottelpos” is what you need.
>>>>>
>>>>> You can find more here:
>>>>>
>>>>> https://bitbucket.org/phosim/phosim_release/wiki/Instance%20Catalog
>>>>>
>>>>> there is a lot new documentation in the past few months, so follow the links around.
>>>>>
>>>>> Regards,
>>>>>
>>>>> John
>>>>>
>>>>>
>>>>>
>>>>>> On Jul 29, 2019, at 11:46 AM, Te-Wei Tsai <TTsai@lsst.org> wrote:
>>>>>>
>>>>>> Hi John,
>>>>>>
>>>>>> May I know is there any instance command I can use in PhoSim to rotate the camera instead of sky?
>>>>>>
>>>>>> I knew there is a rotskypos instance command to rotate the sky. However, the optical system (optical path difference, OPD) keeps the same. This means the wavefront error calculated from the defocal image keeps the same between rotskypos=30 and rotskypos=0, for example. (I used the central donut image, which has the field position of (0, 0)).
>>>>>>
>>>>>> The reason for this is because I am dealing with the camera image that has a non-zero rotation angle now. You could imagine that the calculated OPD based on the CCD eimage should be rotated as well because of the readout x, y direction of CCD has been rotated.
>>>>>>
>>>>>> If there is no such camera rotation command in PhoSim, I could rotate the image by myself also. However, I am not sure if the rotskypos=30 and the sky rotates 30 degree, the OPD on camera by CCD eimage should rotate 30 or -30 or other angles. May I have some comments from you?
>>>>>>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Te-Wei Tsai
>>>>>>
>>>>>> Software engineer, LSST T&S team
>>>>>>
>>>>>
>>>>
>>