diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/imio/imaplv.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/imio/imaplv.x')
-rw-r--r-- | sys/imio/imaplv.x | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/imio/imaplv.x b/sys/imio/imaplv.x new file mode 100644 index 00000000..36a1f315 --- /dev/null +++ b/sys/imio/imaplv.x @@ -0,0 +1,30 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <imhdr.h> +include <imio.h> + +# IMAPLV -- Transform the logical vector LV (which references an image section) +# into a physical vector (which references the physical image). + +procedure imaplv (im, lv, pv, ndim) + +pointer im +long lv[ndim], pv[IM_MAXDIM] +int ndim +int loff # logical offset (subscript) +int nldims # number of logical dimensions +int i, j # i = logical dim index, j = physical dim index + +begin + i = 1 + nldims = min (IM_NDIM(im), ndim) + + do j = 1, IM_NPHYSDIM(im) { + if (i <= nldims && IM_VMAP(im,i) == j) { + loff = lv[i] + i = i + 1 + } else + loff = 1 + pv[j] = IM_VOFF(im,j) + IM_VSTEP(im,j) * loff + } +end |