aboutsummaryrefslogtreecommitdiff
path: root/math/interp/asieva.x
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/interp/asieva.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/interp/asieva.x')
-rw-r--r--math/interp/asieva.x38
1 files changed, 38 insertions, 0 deletions
diff --git a/math/interp/asieva.x b/math/interp/asieva.x
new file mode 100644
index 00000000..bc5fcbb3
--- /dev/null
+++ b/math/interp/asieva.x
@@ -0,0 +1,38 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# procedure to evaluate interpolator at a sequence of ordered points
+# aasumes that all x_values land within [1,n].
+
+procedure asieva(x, y, n, coeff)
+include "interpdef.h"
+include "asidef.h"
+
+real x[ARB] # ordered x array
+int n # no. of points in x
+real coeff[ARB]
+
+real y[ARB] # interpolated values
+
+begin
+ switch (ITYPEI) { # switch on interpolator type
+
+ case IT_NEAREST :
+ call iievne(x, y, n, coeff[COFF + 1])
+
+ case IT_LINEAR :
+ call iievli(x, y, n, coeff[COFF + 1])
+
+ case IT_POLY3 :
+ call iievp3(x, y, n, coeff[COFF + 1])
+
+ case IT_POLY5 :
+ call iievp5(x, y, n, coeff[COFF + 1])
+
+ case IT_SPLINE3 :
+ call iievs3(x, y, n, coeff[COFF + 1])
+
+ }
+
+ return
+
+end