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/curfit/cvvector.gx | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/curfit/cvvector.gx')
-rw-r--r-- | math/curfit/cvvector.gx | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/math/curfit/cvvector.gx b/math/curfit/cvvector.gx new file mode 100644 index 00000000..eb005a1a --- /dev/null +++ b/math/curfit/cvvector.gx @@ -0,0 +1,42 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <math/curfit.h> + +$if (datatype == r) +include "curfitdef.h" +$else +include "dcurfitdef.h" +$endif + +# CVVECTOR -- Procedure to evaluate a curve. The CV_NCOEFF(cv) coefficients +# are assumed to be in COEFF. + +$if (datatype == r) +procedure cvvector (cv, x, yfit, npts) +$else +procedure dcvvector (cv, x, yfit, npts) +$endif + +pointer cv # curve descriptor +PIXEL x[npts] # data x values +PIXEL yfit[npts] # the fitted y values +int npts # number of data points + +begin + switch (CV_TYPE(cv)) { + case LEGENDRE: + call $tcv_evleg (COEFF(CV_COEFF(cv)), x, yfit, npts, CV_ORDER(cv), + CV_MAXMIN(cv), CV_RANGE(cv)) + case CHEBYSHEV: + call $tcv_evcheb (COEFF(CV_COEFF(cv)), x, yfit, npts, CV_ORDER(cv), + CV_MAXMIN(cv), CV_RANGE(cv)) + case SPLINE3: + call $tcv_evspline3 (COEFF(CV_COEFF(cv)), x, yfit, npts, + CV_NPIECES(cv), -CV_XMIN(cv), CV_SPACING(cv)) + case SPLINE1: + call $tcv_evspline1 (COEFF(CV_COEFF(cv)), x, yfit, npts, + CV_NPIECES(cv), -CV_XMIN(cv), CV_SPACING(cv)) + case USERFNC: + call $tcv_evuser (cv, x, yfit, npts) + } +end |