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/gsurfit/gsstatd.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/gsurfit/gsstatd.x')
-rw-r--r-- | math/gsurfit/gsstatd.x | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/math/gsurfit/gsstatd.x b/math/gsurfit/gsstatd.x new file mode 100644 index 00000000..b8c551f1 --- /dev/null +++ b/math/gsurfit/gsstatd.x @@ -0,0 +1,83 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <math/gsurfit.h> +include "dgsurfitdef.h" + +# GSGET -- Procedure to fetch a gsurfit parameter +double procedure dgsgetd (sf, parameter) + +pointer sf # pointer to the surface fit +int parameter # parameter to be fetched + +begin + switch (parameter) { + case GSXMAX: + return (GS_XMAX(sf)) + case GSXMIN: + return (GS_XMIN(sf)) + case GSYMAX: + return (GS_YMAX(sf)) + case GSYMIN: + return (GS_YMIN(sf)) + case GSXREF: + return (GS_XREF(sf)) + case GSYREF: + return (GS_YREF(sf)) + case GSZREF: + return (GS_ZREF(sf)) + } +end + + +# GSSET -- Procedure to set a gsurfit parameter +procedure dgsset (sf, parameter, val) + +pointer sf # pointer to the surface fit +int parameter # parameter to be fetched +double val # value to set + +begin + switch (parameter) { + case GSXREF: + GS_XREF(sf) = val + case GSYREF: + GS_YREF(sf) = val + case GSZREF: + GS_ZREF(sf) = val + } +end + + +# GSGETI -- Procedure to fetch an integer parameter + +int procedure dgsgeti (sf, parameter) + +pointer sf # pointer to the surface fit +int parameter # integer parameter + +begin + switch (parameter) { + case GSTYPE: + return (GS_TYPE(sf)) + case GSXORDER: + switch (GS_TYPE(sf)) { + case GS_LEGENDRE, GS_CHEBYSHEV, GS_POLYNOMIAL: + return (GS_XORDER(sf)) + } + case GSYORDER: + switch (GS_TYPE(sf)) { + case GS_LEGENDRE, GS_CHEBYSHEV, GS_POLYNOMIAL: + return (GS_YORDER(sf)) + } + case GSXTERMS: + return (GS_XTERMS(sf)) + case GSNXCOEFF: + return (GS_NXCOEFF(sf)) + case GSNYCOEFF: + return (GS_NYCOEFF(sf)) + case GSNCOEFF: + return (GS_NCOEFF(sf)) + case GSNSAVE: + return (GS_SAVECOEFF+GS_NCOEFF(sf)) + } +end |