aboutsummaryrefslogtreecommitdiff
path: root/sys/mwcs/mwgltermd.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/mwcs/mwgltermd.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/mwcs/mwgltermd.x')
-rw-r--r--sys/mwcs/mwgltermd.x37
1 files changed, 37 insertions, 0 deletions
diff --git a/sys/mwcs/mwgltermd.x b/sys/mwcs/mwgltermd.x
new file mode 100644
index 00000000..e2db0c0d
--- /dev/null
+++ b/sys/mwcs/mwgltermd.x
@@ -0,0 +1,37 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <syserr.h>
+include "mwcs.h"
+
+# MW_GLTERMD -- Get the current Lterm, double precision version.
+
+procedure mw_gltermd (mw, ltm, ltv, ndim)
+
+pointer mw #I pointer to MWCS descriptor
+double ltm[ndim,ndim] #O linear transformation matrix
+double ltv[ndim] #O translation vector
+int ndim #I dimensionality of system
+
+int i
+errchk syserrs
+
+begin
+ # The dimensionality of the data must match that of the current Lterm.
+ if (ndim != MI_NDIM(mw))
+ call syserrs (SYS_MWNDIM, "mw_gltermd")
+
+ # Copy out the data. Default to a unitary transformation if the
+ # Lterm has not been initialized.
+
+ if (MI_LTM(mw) == NULL) {
+ call aclrd (ltm, ndim*ndim)
+ do i = 1, ndim
+ ltm[i,i] = 1.0D0
+ } else
+ call amovd (D(mw,MI_LTM(mw)), ltm, ndim*ndim)
+
+ if (MI_LTV(mw) == NULL)
+ call aclrd (ltv, ndim)
+ else
+ call amovd (D(mw,MI_LTV(mw)), ltv, ndim)
+end