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/ak/aglti.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/vops/ak/aglti.x')
-rw-r--r-- | sys/vops/ak/aglti.x | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/vops/ak/aglti.x b/sys/vops/ak/aglti.x new file mode 100644 index 00000000..c37a650e --- /dev/null +++ b/sys/vops/ak/aglti.x @@ -0,0 +1,29 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# AGLT -- Given a list of ranges, replace the value of each input pixel +# which falls within a given range by applying the corresponding linear +# transformation (b = a * kmul + kadd). If KMUL is identically zero, +# B is replaced by the constant KADD. + +procedure aglti (a, b, npix, low, high, kmul, kadd, nrange) + +int a[ARB], b[ARB], pixval +int npix, i +int low[nrange], high[nrange] # range limits +real kmul[nrange], kadd[nrange] +int nrange, nr + +begin + do i = 1, npix { + pixval = a[i] + b[i] = pixval + do nr = 1, nrange + if (pixval >= low[nr] && pixval <= high[nr]) { + if (kmul[nr] == 0.0) + b[i] = kadd[nr] + else + b[i] = (pixval * kmul[nr]) + kadd[nr] + break + } + } +end |