aboutsummaryrefslogtreecommitdiff
path: root/sys/vops/ak/aiftrx.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/vops/ak/aiftrx.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/vops/ak/aiftrx.x')
-rw-r--r--sys/vops/ak/aiftrx.x31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/vops/ak/aiftrx.x b/sys/vops/ak/aiftrx.x
new file mode 100644
index 00000000..63a9d53d
--- /dev/null
+++ b/sys/vops/ak/aiftrx.x
@@ -0,0 +1,31 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# AIFTRX -- Inverse discreet fourier transform (real transform, complex data
+# array in). The input array A of length NPIX/2+1 contains the DC term and
+# the NPIX/2 (real,imag) pairs for each of the NPIX/2 harmonics of the real
+# transform. Upon output array B contains the NPIX real data pixels from the
+# inverse transform. The transform may be performed in place if desired.
+#
+# N.B.: The Fortran 77 standard guarantees that a complex datum is represented
+# as two reals, and that the first real in storage order is the real part of
+# the complex datum and the second real the imaginary part. We have defined
+# B to be a type COMPLEX array in the calling program, but FFS expects a
+# REAL array containing (real,imag) pairs. The Fortran standard appears to
+# guarantee that this will work.
+
+procedure aiftrx (a, b, npix)
+
+complex a[ARB] # transform, npix/2+1 elements
+real b[ARB] # output data array
+int npix
+int ier
+
+begin
+ # The following is a no-op if A and B are the same array.
+ call amovx (a, b, npix / 2 + 1)
+
+ # Compute the inverse real transform.
+ call ffs (b, npix, ier)
+ if (ier == 1)
+ call fatal (1, "afftrx: npix not a power of 2")
+end