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


ssclib (ssclib-4.33) [xmmsas_20190531_1155-18.0.0]

Generating a set of points along an ellipse locus

  subroutine calcEllipseFromAngle(xSemi, ySemi, angleDeg, xVals, yVals)
    real(single), intent(in)  :: xSemi, ySemi, angleDeg
    real(single), intent(out) :: xVals(:), yVals(size(xVals))
  end subroutine calcEllipseFromAngle

Equation 2 can be decomposed into the following pair of parametric equations in $theta$:


\begin{displaymath}
x = R_x \cos(\theta)
\end{displaymath}


\begin{displaymath}
y = R_y \sin(\theta).
\end{displaymath}

$theta$ here plays the same role as in equations 3 and 4. The subroutine returns points evenly distributed in $theta$.

The matching `phase'-style subroutine is

  subroutine calcEllipseFromPhase(xAmp, yAmp, phase, xVals, yVals)
    real(single), intent(in)  :: xAmp, yAmp, phase
    real(single), intent(out) :: xVals(:), yVals(size(xVals))
  end subroutine calcEllipseFromPhase

Again the point coordinates returned in xVals and yVals are distributed evenly in $theta$.



XMM-Newton SOC/SSC -- 2019-06-02