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. D_{ref} is the reference date. The computed corrections are saved in the science extension header as TDDALPHA and TDDBETA keywords.

TDDALPHA = A_{0} + {A_{1}*(obsdate - D_{ref})}

TDDBETA =  B_{0} + B_{1}*(obsdate - D_{ref})

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

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

Non-Polynomial 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 record-valued 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 from NPOLEXT, 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 record-valued 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 from D2IMEXT, a subsequent update will overwrite the existing extensions. If WCSDVARR extensions were not found in the science file, they will be added.