XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]

raDecToTan

  interface raDecToTan
    subroutine raDecToTanScalar(refRaDeg, refDecDeg, raDeg, decDeg, tanX, tanY)
      real(double), intent(in)  :: refRaDeg,&
                                   refDecDeg,&
                                   raDeg,&
                                   decDeg
      real(double), intent(out) :: tanX,&
                                   tanY
    end subroutine raDecToTanScalar

    subroutine raDecToTanVector(refRaDeg, refDecDeg, raDeg, decDeg, tanX, tanY)
      real(double), intent(in)  :: refRaDeg,&
                                   refDecDeg,&
                                   raDeg(:),&
                                   decDeg(size(raDeg))
      real(double), intent(out) :: tanX(size(raDeg)),&
                                   tanY(size(raDeg))
    end subroutine raDecToTanVector

    subroutine raDecToTanArray(ra, dec, refRa, refDec, xTan, yTan)
      real(double), intent(in)  :: refRa,&
                                   refDec,&
                                   ra(:,:),&
                                   dec(size(ra,1),size(ra,2))
      real(double), intent(out) :: xTan(size(ra,1),size(ra,2)),&
                                   yTan(size(ra,1),size(ra,2))
    end subroutine raDecToTanArray

    subroutine raDecToTanScalarWcs(ra, dec, wcs, xTan, yTan)
      real(double), intent(in)  :: ra, dec
      type(WcsT),   intent(in)  :: wcs
      real(double), intent(out) :: xTan, yTan
    end subroutine raDecToTanScalarWcs

    subroutine raDecToTanVectorWcs(ra, dec, wcs, xTan, yTan)
      real(double), intent(in)  :: ra(:),&
                                   dec(size(ra))
      type(WcsT),   intent(in)  :: wcs
      real(double), intent(out) :: xTan(size(ra)),&
                                   yTan(size(ra))
    end subroutine raDecToTanVectorWcs

    subroutine raDecToTanArrayWcs(ra, dec, wcs, xTan, yTan)
      real(double), intent(in)  :: ra(:,:),&
                                   dec(size(ra,1),size(ra,2))
      type(WcsT),   intent(in)  :: wcs
      real(double), intent(out) :: xTan(size(ra,1),size(ra,2)),&
                                   yTan(size(ra,1),size(ra,2))
    end subroutine raDecToTanArrayWcs
  end interface

This transform is a projection from celestial coordinates to that tangent plane normal to the direction defined by refRaDeg and refDecDeg. The signs of the returned values are such that tanX increases in the direction of decreasing ra and tanY increases in the direction of increasing dec. If the tangent plane were viewed from the centre of the celestial sphere, with the celestial north pole at the zenith, tanX would increase to rightwards and tanY upwards.



XMM-Newton SOC -- 2023-04-16