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/ak/ahivx.x | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sys/vops/ak/ahivx.x (limited to 'sys/vops/ak/ahivx.x') diff --git a/sys/vops/ak/ahivx.x b/sys/vops/ak/ahivx.x new file mode 100644 index 00000000..b487aa8d --- /dev/null +++ b/sys/vops/ak/ahivx.x @@ -0,0 +1,26 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# AHIV -- Compute the high value (maximum) of a vector. + +complex procedure ahivx (a, npix) + +complex a[ARB] +int npix +complex high, pixval +real abs_high +int i + +begin + high = a[1] + abs_high = abs (high) + + do i = 1, npix { + pixval = a[i] + if (abs (pixval) > abs_high) { + high = pixval + abs_high = abs (high) + } + } + + return (high) +end -- cgit