code: def compute_wcslin(self,undistort=True):
          
          for chip in range(1,self._numchips+1,1):
              sci_chip = self._image[self.scienceExt,chip]
              chip_wcs = sci_chip.wcs.copy()
  
              if chip_wcs.sip is None or not undistort or chip_wcs.instrument=='DEFAULT':
                  chip_wcs.sip = None
                  chip_wcs.cpdis1 = None
                  chip_wcs.cpdis2 = None
                  chip_wcs.det2im = None
                  undistort=False
  
              # compute the undistorted 'natural' plate scale for this chip
              wcslin = distortion.utils.output_wcs([chip_wcs],undistort=undistort)
              sci_chip.wcslin_pscale = wcslin.pscale
docs: Compute the undistorted WCS based solely on the known distortion
              model information associated with the WCS.