The grism_ts_sw NIRcam apertures are apertures on the SW detectors that "tag along" existing LW apertures. The generate_nircam.py code calls the tools.match_v2v3 method to match the (V2,V3) of the tag along apertures to a corresponding LW one.
In theory the method should also modify the distortion coefficients associated to the SW aperture, once the SW aperture is moved to match the LW one.
I have however seen that explicitly calling the tools.set_reference_point_and_distortion method after the tools.match_v2v3 further modifies the aperture. Several quantities are affected: V2Ref, V3Ref, V3SciXAngle, V3SciYAngle, Idl2SciX00, Idl2SciY00 and this, for example changes the roundtrip erorr.
I wonder if this is the expected behavior. In theory I would be expecting the second call to tools.set_reference_point_and_distortion to have no effect.
For consistency with the treatment of all other apertures distortion coefficient I wonder if we should explicitly call tools.set_reference_point_and_distortion once more, as the generate_nircam code in this PR does.
But possibly first we need to understand what is really going on behind the scenes
The
grism_ts_sw
NIRcam apertures are apertures on the SW detectors that "tag along" existing LW apertures. Thegenerate_nircam.py
code calls thetools.match_v2v3
method to match the (V2,V3) of the tag along apertures to a corresponding LW one.In theory the method should also modify the distortion coefficients associated to the SW aperture, once the SW aperture is moved to match the LW one.
I have however seen that explicitly calling the
tools.set_reference_point_and_distortion
method after thetools.match_v2v3
further modifies the aperture. Several quantities are affected: V2Ref, V3Ref, V3SciXAngle, V3SciYAngle, Idl2SciX00, Idl2SciY00 and this, for example changes the roundtrip erorr. I wonder if this is the expected behavior. In theory I would be expecting the second call totools.set_reference_point_and_distortion
to have no effect.For consistency with the treatment of all other apertures distortion coefficient I wonder if we should explicitly call
tools.set_reference_point_and_distortion
once more, as thegenerate_nircam
code in this PR does. But possibly first we need to understand what is really going on behind the scenes