aboutsummaryrefslogtreecommitdiff
path: root/math/gsurfit/gscoeff.gx
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /math/gsurfit/gscoeff.gx
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/gsurfit/gscoeff.gx')
-rw-r--r--math/gsurfit/gscoeff.gx31
1 files changed, 31 insertions, 0 deletions
diff --git a/math/gsurfit/gscoeff.gx b/math/gsurfit/gscoeff.gx
new file mode 100644
index 00000000..84c495f7
--- /dev/null
+++ b/math/gsurfit/gscoeff.gx
@@ -0,0 +1,31 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+$if (datatype == r)
+include "gsurfitdef.h"
+$else
+include "dgsurfitdef.h"
+$endif
+
+# 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).
+
+$if (datatype == r)
+procedure gscoeff (sf, coeff, ncoeff)
+$else
+procedure dgscoeff (sf, coeff, ncoeff)
+$endif
+
+pointer sf # pointer to the surface fitting descriptor
+PIXEL coeff[ARB] # the coefficients of the fit
+int ncoeff # the number of coefficients
+
+begin
+ # calculate the number of coefficients
+ ncoeff = GS_NCOEFF(sf)
+ call amov$t (COEFF(GS_COEFF(sf)), coeff, ncoeff)
+end