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/alov.gx | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/vops/alov.gx')
-rw-r--r-- | sys/vops/alov.gx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sys/vops/alov.gx b/sys/vops/alov.gx new file mode 100644 index 00000000..27a81128 --- /dev/null +++ b/sys/vops/alov.gx @@ -0,0 +1,35 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# ALOV -- Compute the low value (minimum) of a vector. + +PIXEL procedure alov$t (a, npix) + +PIXEL a[ARB] +int npix +PIXEL low, pixval +$if (datatype == x) +real abs_low +$endif +int i + +begin + low = a[1] + $if (datatype == x) + abs_low = abs (low) + $endif + + do i = 1, npix { + pixval = a[i] + $if (datatype == x) + if (abs (pixval) < abs_low) { + low = pixval + abs_low = abs (low) + } + $else + if (pixval < low) + low = pixval + $endif + } + + return (low) +end |