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


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]

fitLine

  subroutine fitLine(x, y, intercept, slope, variance, covar, status)
    real(single), intent(in)            :: x(:), y(size(x))
    real(single), intent(out)           :: intercept, slope
    real(single), intent(out), optional :: variance, covar(2, 2)
    integer,      intent(out), optional :: status
  end subroutine fitLine

This fits a straight line to the set of points defined by x and y. The solution method is the standard one which assumes uncertainty in the y values only and solves the normal equations to arrive at a solution which minimizes the sum of the squares of the $y$-separation between the resulting line and each point.



XMM-Newton SOC -- 2023-04-16