code: def transformToRef(self):
          
          if 'refxyunits' in self.pars and self.pars['refxyunits'] == 'pixels':
              log.info('Creating RA/Dec positions for reference sources...')
              self.outxy = np.column_stack([self.all_radec[0][:,np.newaxis],self.all_radec[1][:,np.newaxis]])
              skypos = self.wcs.wcs_pix2world(self.all_radec[0],self.all_radec[1],self.origin)
              self.all_radec[0] = skypos[0]
              self.all_radec[1] = skypos[1]
          else:
              log.info('Converting RA/Dec positions of reference sources from "%s" to '%self.name+
                          'X,Y positions in reference WCS...')
              self.refWCS = self.wcs
              outxy = self.wcs.wcs_world2pix(self.all_radec[0],self.all_radec[1],self.origin)
              # convert outxy list to a Nx2 array
              self.outxy = np.column_stack([outxy[0][:,np.newaxis],outxy[1][:,np.newaxis]])
docs: Transform reference catalog sky positions (self.all_radec)
          to reference tangent plane (self.wcs) to create output X,Y positions.