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/vops/acht.gx | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
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 |