Open kdlawson opened 1 year ago
I have re-confirmed that for regular NIRCam imaging, there is no need to adjust the rotation parameter.
Here's an example of a NRC ALONG PSF from yesterday (the LW parallel taken to the routine WFS), and the right-out-of-the-box simulation (no adjustments applied other than loading yesterday's WFS OPD, and aligning in position and flux).
This confirms that the overall NIRCam pupil-to-detector rotation is simulated correctly, and the discrepancy in the simulation has to be from the Lyot wheel rotation. I.e. it's correct to adjust via the nrc.options['pupil_rotation']
as you're doing, and NOT by changing the overall nrc._rotation
parameter.
To triple check, I did repeat the same simulation with adjusting nrc._rotation
, and it's unambiguously not a good match for the data.
The models relevant for this will be improved by PR #675
PSFs generated by WebbPSF appear to be rotated relative to on-sky PSFs. This is especially visible at large separations:
(Note: data are F300M + 335R coronagraphy; WebbPSF models include distortion and data are not distortion-corrected)
Talking with @mperrin, it sounds likely that this is caused by pupil shear: pupil shear for the on-sky data is causing a small rotation of the PSFs which isn't included in the WebbPSF model. Setting
nrc.options['pupil_rotation'] = -0.5
gets much closer to the on-sky PSFs' orientation:However, since the translation components of shear (
nrc.options['pupil_shift_x']
andnrc.options['pupil_shift_y']
) are not coupled to the rotation effect in WebbPSF, simply adopting empirical X/Y shear measurements won't correct the rotation.Assuming some nominal shear effects by default may be beyond the scope of this project. However, I think that at least including a default pupil_rotation value to approximately correct this would improve functionality for many users who might otherwise miss this nuance.
Beyond that: in cases where pupil_rotation is not set while pupil_shift_x and pupil_shift_y are, automatically populating a corresponding pupil_rotation would be a really helpful functionality.
Thanks much! Please let me know if there is additional info I can provide.