fit_line#

lsst.meas.algorithms.fit_line(x, y)#

Fit the line that minimizes the summed squared perpendicular distances of points from it.

Unlike a regression of y on x, this fits lines at any angle, including vertical ones, equally well.

Parameters#

x, ynumpy.ndarray

Coordinates of at least two points.

Returns#

lineFittedLine

The fitted line.