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 /noao/imred/vtel/getsqib.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/imred/vtel/getsqib.x')
-rw-r--r-- | noao/imred/vtel/getsqib.x | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/noao/imred/vtel/getsqib.x b/noao/imred/vtel/getsqib.x new file mode 100644 index 00000000..76e7e44d --- /dev/null +++ b/noao/imred/vtel/getsqib.x @@ -0,0 +1,55 @@ +include <mach.h> +include <imhdr.h> +include "vt.h" + +# GETSQIB -- Make a new image from a solar synoptic image containing just +# the squibby brightness. + +procedure t_getsqib() + +char image[SZ_FNAME] # input image +char sqibimage[SZ_FNAME] # output squibby brightness image + +int i, numpix +pointer im, lgp, lpp, sqibim + +pointer immap(), imgl2s(), impl2s() +errchk immap, imgl2s, impl2s + +begin + # Get parameters from the CL. + call clgstr ("image", image, SZ_FNAME) + call clgstr ("sqibimage", sqibimage, SZ_FNAME) + + # Open image. + im = immap (image, READ_ONLY, 0) + sqibim = immap (sqibimage, NEW_COPY, im) + + numpix = IM_LEN(im,1) + do i = 1, IM_LEN(im,2) { + lgp = imgl2s (im, i) + lpp = impl2s (sqibim, i) + call sqibline (Mems[lgp], Mems[lpp], numpix) + } + + # Unmap images. + call imunmap (im) + call imunmap (sqibim) +end + + +# SQIBLINE -- Unpack squibby brightness from line1 and put it into line2. + +procedure sqibline (line1, line2, numpix) + +short line1[numpix] # input image line +short line2[numpix] # output image line +int numpix # number of pixels in line + +int i +int and() + +begin + do i = 1, numpix + line2[i] = and(int(line1[i]),17B) +end |