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.