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


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]

raDecToInst

  interface raDecToInst
    subroutine raDecToInstScalar(raDeg, decDeg, scAttitude&
      , timeStamp, detX, detY, thetaArcsec, phi)

      real(double),                 intent(in) :: raDeg,&
                                                  decDeg
      type(SpacecraftAttitudeType), intent(in) :: scAttitude
      real(double),                 intent(in) :: timeStamp
      real(single)     , optional, intent(out) :: detX,&
                                                  detY
      real(double)     , optional, intent(out) :: thetaArcsec,&
                                                  phi
    end subroutine raDecToInstScalar

    subroutine raDecToInstVector(raDeg, decDeg, scAttitude&
      , timeStamp, detX, detY, thetaArcsec, phi)

      real(double),                 intent(in) :: raDeg(:),&
                                                  decDeg(size(raDeg))
      type(SpacecraftAttitudeType), intent(in) :: scAttitude
      real(double),                 intent(in) :: timeStamp
      real(single)     , optional, intent(out) :: detX(size(raDeg)),&
                                                  detY(size(raDeg))
      real(double)     , optional, intent(out) :: thetaArcsec(size(raDeg)),&
                                                  phi(size(raDeg))
    end subroutine raDecToInstVector

  end interface

This subroutine converts from celestial coordinates to instrument-centric coordinates, in either the DETX/Y (the same, up to a scalar multiple, as the CAMCOORD2 system) or TELCOORD systems, depending on which of the optional variables $detX$, $detY$, $thetaArcsec$ and $phi$ the caller has supplied.

NOTE this subroutine requires the cal to have been set to the correct instrument before the call.



XMM-Newton SOC -- 2023-04-16