### SLA_INVF

Invert Linear Model

ACTION:
Invert a linear model of the type produced by the sla_FITXY routine.
CALL:
CALL sla_INVF (FWDS,BKWDS,J)
##### GIVEN:
 FWDS D(6) model coefficients

##### RETURNED:
 BKWDS D(6) inverse model J I status: 0 = OK, $-$1 = no inverse

NOTES:
(1)
The models relate two sets of $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$ coordinates as follows. Naming the six elements of FWDS $a,b,c,d,e$ & $f$, where two sets of coordinates $\left[{x}_{1},{y}_{1}\right]$ and $\left[{x}_{2},{y}_{2}\phantom{\rule{0.3em}{0ex}}\right]$ are related thus:

${x}_{2}=a+b{x}_{1}+c{y}_{1}$
${y}_{2}=d+e{x}_{1}+f{y}_{1}$

The present routine generates a new set of coefficients $p,q,r,s,t$ & $u$ (the array BKWDS) such that:

${x}_{1}=p+q{x}_{2}+r{y}_{2}$
${y}_{1}=s+t{x}_{2}+u{y}_{2}$

(2)
Two successive calls to this routine will deliver a set of coefficients equal to the starting values.
(3)
To comply with the ANSI Fortran 77 standard, FWDS and BKWDS must not be the same array. The routine is, in fact, coded so as to work properly with many Fortran compilers even if this rule is violated, something that is not, however, recommended.
(4)