diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/mwcs/mwltran.gx | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/mwcs/mwltran.gx')
-rw-r--r-- | sys/mwcs/mwltran.gx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/mwcs/mwltran.gx b/sys/mwcs/mwltran.gx new file mode 100644 index 00000000..d7b823b6 --- /dev/null +++ b/sys/mwcs/mwltran.gx @@ -0,0 +1,26 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "../mwcs.h" + +# MW_LTRAN -- Perform a general N-dimensional linear transformation, i.e., +# matrix multiply and translation. + +procedure mw_ltran$t (p1, p2, ltm, ltv, ndim) + +PIXEL p1[ndim] #I input point +PIXEL p2[ndim] #O transformed output point +PIXEL ltm[ndim,ndim] #I linear transformation matrix +PIXEL ltv[ndim] #I linear translation vector +int ndim #I dimension of system + +int i, j +PIXEL p3[MAX_DIM] + +begin + call amov$t (p1, p3, ndim) + do j = 1, ndim { + p2[j] = ltv[j] + do i = 1, ndim + p2[j] = p2[j] + ltm[i,j] * p3[i] + } +end |