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/vops/acht.gx | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/vops/acht.gx')
-rw-r--r-- | sys/vops/acht.gx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/vops/acht.gx b/sys/vops/acht.gx new file mode 100644 index 00000000..e1ad83f4 --- /dev/null +++ b/sys/vops/acht.gx @@ -0,0 +1,36 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# ACHTxy -- Change datatype of vector from "x" to "y" (doubly generic). +# The operation is performed in such a way that the output vector can be +# the same as the input vector without overwriting data. + +procedure acht$t$$t (a, b, npix) + +PIXEL a[ARB] +$PIXEL b[ARB] +int npix +$$if (datatype != $t) +int i +$$endif + +begin + $$if (datatype == $t) + call amov$t (a, b, npix) + $$else + $$if (sizeof(t) <= sizeof($t)) + do i = 1, npix + $$if (datatype == x) + b[i] = complex(real(a[i]),0.0) + $$else + b[i] = a[i] + $$endif + $$else + do i = npix, 1, -1 + $$if (datatype == x) + b[i] = complex(real(a[i]),0.0) + $$else + b[i] = a[i] + $$endif + $$endif + $$endif +end |