From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/vops/argt.gx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sys/vops/argt.gx (limited to 'sys/vops/argt.gx') diff --git a/sys/vops/argt.gx b/sys/vops/argt.gx new file mode 100644 index 00000000..3ac2fbc4 --- /dev/null +++ b/sys/vops/argt.gx @@ -0,0 +1,28 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# ARGT -- Replace if greater than. If A[i] is greater than CEIL replace by +# NEWVAL. + +procedure argt$t (a, npix, ceil, newval) + +PIXEL a[ARB] +int npix +PIXEL ceil, newval +int i +$if (datatype == x) +real abs_ceil +$endif + +begin + $if (datatype == x) + abs_ceil = abs (ceil) + $endif + + do i = 1, npix + $if (datatype == x) + if (abs (a[i]) > abs_ceil) + $else + if (a[i] > ceil) + $endif + a[i] = newval +end -- cgit