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/msigrid.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/iminterp/msigrid.x')
-rw-r--r-- | math/iminterp/msigrid.x | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/math/iminterp/msigrid.x b/math/iminterp/msigrid.x new file mode 100644 index 00000000..01d114a2 --- /dev/null +++ b/math/iminterp/msigrid.x @@ -0,0 +1,65 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "im2interpdef.h" +include <math/iminterp.h> + +# MSIGRID -- Procedure to evaluate the interpolant on a rectangular +# grid. The procedure assumes that 1 <= x <= nxpix and 1 <= y <= nypix. +# The x and y vectors must be ordered such that x[i] < x[i+1] and +# y[i] < y[i+1]. + +procedure msigrid (msi, x, y, zfit, nx, ny, len_zfit) + +pointer msi # pointer to interpolant descriptor structure +real x[ARB] # array of x values +real y[ARB] # array of y values +real zfit[len_zfit,ARB] # array of fitted values +int nx # number of x points +int ny # number of y points +int len_zfit # row length of zfit + +errchk ii_grnearest, ii_grlinear, ii_grpoly3, ii_grpoly5, ii_grspline3 +errchk ii_grsinc, ii_grlsinc, ii_grdirz + +begin + + switch (MSI_TYPE(msi)) { + + case II_BINEAREST: + call ii_grnearest (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), x, y, zfit, nx, ny, len_zfit) + + case II_BILINEAR: + call ii_grlinear (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), x, y, zfit, nx, ny, len_zfit) + + case II_BIPOLY3: + call ii_grpoly3 (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), x, y, zfit, nx, ny, len_zfit) + + case II_BIPOLY5: + call ii_grpoly5 (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), x, y, zfit, nx, ny, len_zfit) + + case II_BISPLINE3: + call ii_grspline3 (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), x, y, zfit, nx, ny, len_zfit) + + case II_BISINC: + call ii_grsinc (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), MSI_NYCOEFF(msi), x, y, zfit, nx, ny, len_zfit, + MSI_NSINC(msi), DX, DY) + + case II_BILSINC: + call ii_grlsinc (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), MSI_NYCOEFF(msi), x, y, zfit, nx, ny, len_zfit, + LTABLE(MSI_LTABLE(msi)), 2 * MSI_NSINC(msi) + 1, MSI_NXINCR(msi), + MSI_NYINCR(msi), DX, DY) + + case II_BIDRIZZLE: + call ii_grdriz (COEFF(MSI_COEFF(msi)), MSI_FSTPNT(msi), + MSI_NXCOEFF(msi), MSI_NYCOEFF(msi), x, y, zfit, nx, ny, + len_zfit, MSI_XPIXFRAC(msi), MSI_YPIXFRAC(msi), + MSI_BADVAL(msi)) + } +end |