WCS Corrections¶
Time Dependent Distortion¶

class
stwcs.updatewcs.corrections.
TDDCorr
¶ Apply time dependent distortion correction to distortion coefficients and basic WCS keywords. This correction must be done before any other WCS correction.
Parameters:  ext_wcs (HSTWCS object) – An HSTWCS object to be modified
 ref_wcs (HSTWCS object) – A reference HSTWCS object
Notes
Compute the ACS/WFC time dependent distortion terms as described in [1] and apply the correction to the WCS of the observation.
The model coefficients are stored in the primary header of the IDCTAB. is the reference date. The computed corrections are saved in the science extension header as TDDALPHA and TDDBETA keywords.
The time dependent distortion affects the IDCTAB coefficients, and the relative location of the two chips. Because the linear order IDCTAB coefficients ar eused in the computatuion of the NPOL extensions, the TDD correction affects all components of the distortion model.
Application of TDD to the IDCTAB polynomial coefficients: The TDD model is computed in Jay’s frame, while the IDCTAB coefficients are in the HST V2/V3 frame. The coefficients are transformed to Jay’s frame, TDD is applied and they are transformed back to the V2/V3 frame. This correction is performed in this class.
Application of TDD to the relative location of the two chips is done in
makewcs
.References
[1] Jay Anderson, “Variation of the Distortion Solution of the WFC”, ACS ISR 200708.
Velocity Aberration Correction¶

class
stwcs.updatewcs.corrections.
VACorr
¶ Apply velocity aberation correction to WCS keywords.
Notes
Velocity Aberration is stored in the extension header keyword ‘VAFACTOR’. The correction is applied to the CD matrix and CRVALs.
Simple Imaging Polynomial Coefficients¶

class
stwcs.updatewcs.corrections.
CompSIP
¶ Compute Simple Imaging Polynomial (SIP) coefficients as defined in [2] from IDC table coefficients.
This class transforms the TDD corrected IDCTAB coefficients into SIP format. It also applies a binning factor to the coefficients if the observation was binned.
References
[2] David Shupe, et al, “The SIP Convention of representing Distortion in FITS Image headers”, Astronomical Data Analysis Software And Systems, ASP Conference Series, Vol. 347, 2005
NonPolynomial Distortion Correction¶

class
stwcs.updatewcs.npol.
NPOLCorr
¶ Defines a Lookup table prior distortion correction as per WCS paper IV. It uses a reference file defined by the NPOLFILE (suffix ‘NPL’) keyword in the primary header.
Notes
 Using extensions in the reference file create a WCSDVARR extensions and add them to the science file.
 Add recordvalued keywords to the science extension header to describe the lookup tables.
 Add a keyword ‘NPOLEXT’ to the science extension header to store the name of the reference file used to create the WCSDVARR extensions.
If WCSDVARR extensions exist and
NPOLFILE
is different fromNPOLEXT
, a subsequent update will overwrite the existing extensions. If WCSDVARR extensions were not found in the science file, they will be added.It is assumed that the NPL reference files were created to work with IDC tables but will be applied with SIP coefficients. A transformation is applied to correct for the fact that the lookup tables will be applied before the first order coefficients which are in the CD matrix when the SIP convention is used.
Detector to Image Correction¶

class
stwcs.updatewcs.det2im.
DET2IMCorr
¶ Defines a Lookup table prior distortion correction as per WCS paper IV. It uses a reference file defined by the D2IMFILE (suffix ‘d2im’) keyword in the primary header.
Notes
 Using extensions in the reference file create a WCSDVARR extensions and add them to the science file.
 Add recordvalued keywords to the science extension header to describe the lookup tables.
 Add a keyword ‘D2IMEXT’ to the science extension header to store the name of the reference file used to create the WCSDVARR extensions.
If WCSDVARR extensions exist and
D2IMFILE
is different fromD2IMEXT
, a subsequent update will overwrite the existing extensions. If WCSDVARR extensions were not found in the science file, they will be added.