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/mwtransr.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/mwcs/mwtransr.x')
-rw-r--r-- | sys/mwcs/mwtransr.x | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/mwcs/mwtransr.x b/sys/mwcs/mwtransr.x new file mode 100644 index 00000000..3947e3d1 --- /dev/null +++ b/sys/mwcs/mwtransr.x @@ -0,0 +1,30 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# MW_TRANSLATE -- Translate the logical system, i.e., perform a linear +# transformation of the logical system by modifying the Lterm of the MWCS. + +procedure mw_translater (mw, ltv_1, ltm, ltv_2, ndim) + +pointer mw #I pointer to MWCS descriptor +real ltv_1[ndim] #I input translation vector +real ltm[ndim,ndim] #I linear transformation matrix +real ltv_2[ndim] #I output translation vector +int ndim #I dimensionality of transform + +int nelem +pointer sp, d_ltm, d_ltv1, d_ltv2 + +begin + call smark (sp) + nelem = ndim * ndim + call salloc (d_ltm, nelem, TY_DOUBLE) + call salloc (d_ltv1, ndim, TY_DOUBLE) + call salloc (d_ltv2, ndim, TY_DOUBLE) + + call achtrd (ltm, Memd[d_ltm], nelem) + call achtrd (ltv_1, Memd[d_ltv1], ndim) + call achtrd (ltv_2, Memd[d_ltv2], ndim) + + call mw_translated (mw, Memd[d_ltv1], Memd[d_ltm], Memd[d_ltv2], ndim) + call sfree (sp) +end |