diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/mwcs/mwtransr.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
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 |