blob: e1ad83f437d5e525f11b76d20a47e31f286f859b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
|