code: def wcs_coord_transform(ct, x, y):
      
      x = float(x)
      y = float(y)
      if (ct.valid):
          # The imtool WCS assumes that the center of the first display
          # pixel is at (0,0) but actually it is at (0.5,0.5).
          #x -= 0.5
          #y -= 0.5
  
          if (abs(ct.a) > .001):
              ra = ct.a * x + ct.c * y + ct.tx
          if (abs(ct.d) > .001):
              dec = ct.b * x + ct.d * y + ct.ty
      else:
          ra = x
          dec = y
      return ((ra, dec))
docs: Computes tha WCS corrected pixel coordinates (RA and Dec
      in degrees) given a coordinate transformation and the screen
      coordinates (x and y, in pixels).
  
      Input:
      ct      coordinate transformation. instance of coord_tran.
      x       x coordinate in pixels.
      y       y coordinate in pixels.
  
      Returns:
      (RA, Dec) in degrees (as floats).