SLA_PXY

Apply Linear Model

ACTION:
Given arrays of expected and measured [x, y] coordinates, and a linear model relating them (as produced by sla_FITXY), compute the array of predicted coordinates and the RMS residuals.
CALL:
CALL sla_PXY (NP,XYE,XYM,COEFFS,XYP,XRMS,YRMS,RRMS)
GIVEN:

NP

I

number of samples

XYE

D(2,NP)

expected [x, y] for each sample

XYM

D(2,NP)

measured [x, y] for each sample

COEFFS

D(6)

coefficients of model (see below)


RETURNED:

XYP

D(2,NP)

predicted [x, y] for each sample

XRMS

D

RMS in X

YRMS

D

RMS in Y

RRMS

D

total RMS (vector sum of XRMS and YRMS)


NOTES:
(1)
The model is supplied in the array COEFFS. Naming the six elements of COEFFS a, b, c, d, e & f, the model transforms measured coordinates [xm, ym] into predicted coordinates [xp, yp] as follows:

xp = a + bxm + cym
yp = d + exm + fym

(2)
The residuals are (xp xe) and (yp ye).
(3)
If NP is less than or equal to zero, no coordinates are transformed, and the RMS residuals are all zero.
(4)
See also sla_FITXY, sla_INVF, sla_XY2XY, sla_DCMPF