Fit a linear model to relate two sets of [x,y] coordinates
0 = OK
-1 = illegal itype
-2 = insufficient data
-3 = no solution
" solid body rotation" option; the model coeffs still consists of the same six
coefficients, but now two of them are used twice (appropriately signed). Origin, scale and
orientation are still modelled, but not squash or shear - the units of x and y have to be the
same.
2) For itype=4, np must be at least 2. For itype=6, np must be at least 3.
3) The model is returned in the array coeffs. Naming the elements of coeffs as follows:
coeffs[0] = A
coeffs[1] = B
coeffs[2] = C
coeffs[3] = D
coeffs[4] = E
coeffs[5] = F
the model is:
xe = A +
B ∗ xm
+ C
∗ ym
ye = D +
E ∗ xm
+ F
∗ ym
For the " solid body rotation" option (itype=4), the magnitudes of B and F, and of C and E, are
equal. The signs of these coefficients depend on whether there is a sign reversal between
xe,ye and xm,ym; fits are performed with and without a sign reversal and the best one
chosen.
4) Error status values j=-1 and -2 leave coeffs unchanged; if j=-3 coeffs may have been changed.