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 /math/iminterp/asiinit.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/iminterp/asiinit.x')
-rw-r--r-- | math/iminterp/asiinit.x | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/math/iminterp/asiinit.x b/math/iminterp/asiinit.x new file mode 100644 index 00000000..daf99665 --- /dev/null +++ b/math/iminterp/asiinit.x @@ -0,0 +1,57 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <math/iminterp.h> +include "im1interpdef.h" + +# ASIINIT -- initialize the array sequential interpolant structure + +procedure asiinit (asi, interp_type) + +pointer asi # interpolant descriptor +int interp_type # interpolant type + +int nconv + +begin + if (interp_type < 1 || interp_type > II_NTYPES) + call error (0,"ASIINIT: Illegal interpolant type.") + else { + call calloc (asi, LEN_ASISTRUCT, TY_STRUCT) + ASI_TYPE(asi) = interp_type + switch (interp_type) { + case II_LSINC: + ASI_NSINC(asi) = NSINC + ASI_NINCR(asi) = NINCR + if (ASI_NINCR(asi) > 1) + ASI_NINCR(asi) = ASI_NINCR(asi) + 1 + ASI_SHIFT(asi) = INDEFR + ASI_PIXFRAC(asi) = PIXFRAC + nconv = 2 * ASI_NSINC(asi) + 1 + call calloc (ASI_LTABLE(asi), nconv * ASI_NINCR(asi), + TY_REAL) + call ii_sinctable (Memr[ASI_LTABLE(asi)], nconv, ASI_NINCR(asi), + ASI_SHIFT(asi)) + case II_SINC: + ASI_NSINC(asi) = NSINC + ASI_NINCR(asi) = 0 + ASI_SHIFT(asi) = INDEFR + ASI_PIXFRAC(asi) = PIXFRAC + ASI_LTABLE(asi) = NULL + case II_DRIZZLE: + ASI_NSINC(asi) = 0 + ASI_NINCR(asi) = 0 + ASI_SHIFT(asi) = INDEFR + ASI_PIXFRAC(asi) = PIXFRAC + ASI_LTABLE(asi) = NULL + default: + ASI_NSINC(asi) = 0 + ASI_NINCR(asi) = 0 + ASI_SHIFT(asi) = INDEFR + ASI_PIXFRAC(asi) = PIXFRAC + ASI_LTABLE(asi) = NULL + } + ASI_BADVAL(asi) = BADVAL + ASI_COEFF(asi) = NULL + } + +end |