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/curfit/cvstat.gx | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'math/curfit/cvstat.gx')
-rw-r--r-- | math/curfit/cvstat.gx | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/math/curfit/cvstat.gx b/math/curfit/cvstat.gx new file mode 100644 index 00000000..e98367b9 --- /dev/null +++ b/math/curfit/cvstat.gx @@ -0,0 +1,61 @@ +# 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 + +# CVSTATI -- Return integer paramters from the curfit package + +$if (datatype == r) +int procedure cvstati (cv, param) +$else +int procedure dcvstati (cv, param) +$endif + +pointer cv # Curfit pointer +int param # Parameter + +begin + switch (param) { + case CVTYPE: + return (CV_TYPE(cv)) + case CVORDER: + switch (CV_TYPE(cv)) { + case LEGENDRE, CHEBYSHEV, USERFNC: + return (CV_ORDER(cv)) + case SPLINE1, SPLINE3: + return (CV_NPIECES(cv) + 1) + } + case CVNSAVE: + if (CV_TYPE(cv) == USERFNC) + return (CV_SAVECOEFF + CV_NCOEFF(cv)) + else + return (CV_SAVECOEFF + CV_NCOEFF(cv) - 1) + case CVNCOEFF: + return (CV_NCOEFF(cv)) + } +end + +# CVSTATR -- Return real paramters from the curfit package + +$if (datatype == r) +PIXEL procedure cvstatr (cv, param) +$else +PIXEL procedure dcvstatd (cv, param) +$endif + +pointer cv # Curfit pointer +int param # Parameter + +begin + switch (param) { + case CVXMIN: + return (CV_XMIN(cv)) + case CVXMAX: + return (CV_XMAX(cv)) + } +end |