aboutsummaryrefslogtreecommitdiff
path: root/math/gsurfit/gscoeffd.x
diff options
context:
space:
mode:
Diffstat (limited to 'math/gsurfit/gscoeffd.x')
-rw-r--r--math/gsurfit/gscoeffd.x23
1 files changed, 23 insertions, 0 deletions
diff --git a/math/gsurfit/gscoeffd.x b/math/gsurfit/gscoeffd.x
new file mode 100644
index 00000000..2090eec1
--- /dev/null
+++ b/math/gsurfit/gscoeffd.x
@@ -0,0 +1,23 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "dgsurfitdef.h"
+
+# GSCOEFF -- Procedure to fetch the number and magnitude of the coefficients.
+# If the GS_XTERMS(sf) = GS_XBI (YES) then the number of coefficients will be
+# (GS_NXCOEFF(sf) * GS_NYCOEFF(sf)); if GS_XTERMS is GS_XTRI then the number
+# of coefficients will be (GS_NXCOEFF(sf) * GS_NYCOEFF(sf) - order *
+# (order - 1) / 2) where order is the minimum of the x and yorders; if
+# GS_XTERMS(sf) = GS_XNONE then the number of coefficients will be
+# (GS_NXCOEFF(sf) + GS_NYCOEFF(sf) - 1).
+
+procedure dgscoeff (sf, coeff, ncoeff)
+
+pointer sf # pointer to the surface fitting descriptor
+double coeff[ARB] # the coefficients of the fit
+int ncoeff # the number of coefficients
+
+begin
+ # calculate the number of coefficients
+ ncoeff = GS_NCOEFF(sf)
+ call amovd (COEFF(GS_COEFF(sf)), coeff, ncoeff)
+end