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 /math/gsurfit/gsfitd.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'math/gsurfit/gsfitd.x')
-rw-r--r-- | math/gsurfit/gsfitd.x | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/math/gsurfit/gsfitd.x b/math/gsurfit/gsfitd.x new file mode 100644 index 00000000..b432cc3f --- /dev/null +++ b/math/gsurfit/gsfitd.x @@ -0,0 +1,35 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <math/gsurfit.h> +include "dgsurfitdef.h" + +# GSFIT -- Procedure to solve the normal equations for a surface. +# The inner products of the basis functions are calculated and +# accumulated into the GS_NCOEFF(sf) ** 2 matrix MATRIX. +# The main diagonal of the matrix is stored in the first row of +# MATRIX followed by the remaining non-zero diagonals. +# The inner product +# of the basis functions and the data ordinates are stored in the +# GS_NCOEFF(sf)-vector VECTOR. The Cholesky factorization of MATRIX +# is calculated and stored in CHOFAC. Forward and back substitution +# is used to solve for the GS_NCOEFF(sf)-vector COEFF. + +procedure dgsfit (sf, x, y, z, w, npts, wtflag, ier) + +pointer sf # surface descriptor +double x[npts] # array of x values +double y[npts] # array of y values +double z[npts] # data array +double w[npts] # array of weights +int npts # number of data points +int wtflag # type of weighting +int ier # ier = OK, everything OK + # ier = SINGULAR, matrix is singular, 1 or more + # coefficients are 0. + # ier = NO_DEG_FREEDOM, too few points to solve matrix + +begin + call dgszero (sf) + call dgsacpts (sf, x, y, z, w, npts, wtflag) + call dgssolve (sf, ier) +end |