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


ssclib (ssclib-4.30) [xmmsas_20160201_1833-15.0.0]

`Rotated' and `phase' formats Routines which deal with Generating a set of Home Index

Meta Index / Home Page / Routines which deal with

Is a given point inside a given ellipse?

Two routines are given for the two ellipse formats described above:

  function pointInEllipseWithPhase(x, y, xAmp, yAmp, phase)
    real(single), intent(in) :: x, y, xAmp, yAmp, phase
    integer :: pointInEllipseWithPhase
  end function pointInEllipseWithPhase

  function pointInEllipseWithAngle(x, y, xSemiAxis, ySemiAxis, rotatedAngle)
    real(single), intent(in) :: x, y, xSemiAxis, ySemiAxis, rotatedAngle
    integer :: pointInEllipseWithAngle
  end function pointInEllipseWithAngle

These functions return -1 if the point (x, y) lies fully within the ellipse; 0 if it is on the border; and 1 if it is fully outside the ellipse.



XMM-Newton SOC/SSC -- 2016-02-01