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 :
ref_wcs: HSTWCS object :

Notes
Compute the ACS/WFC time dependent distortion terms as described in [R1] 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
[R1]  (1, 2) Jay Anderson, “Variation of the Distortion Solution of the WFC”, ACS ISR 200708. 
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.
Compute Simple Imaging Polynomial (SIP) coefficients as defined in [R4] 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
[R4]  (1, 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 
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
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.
Stores a small correction to the detector coordinates as a d2imarr extension in the science file.
Notes
For the case of ACS/WFC every 68th column is wider than the rest. To compensate for this a small correction needs to be applied to the detector coordinates. We call this a detector to image transformation. The so obtained image coordinates are the input to all other distortion corrections. The correction is originally stored in an external reference file pointed to by ‘D2IMFILE’ keyword in the primary header. This class attaches the correction array as an extension to the science file with extname = d2imarr.
Other keywords used in this correction are:
D2IMERR: float, optional  maximum value of the correction