aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/apextract/apcveval.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 /noao/twodspec/apextract/apcveval.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/apextract/apcveval.x')
-rw-r--r--noao/twodspec/apextract/apcveval.x19
1 files changed, 19 insertions, 0 deletions
diff --git a/noao/twodspec/apextract/apcveval.x b/noao/twodspec/apextract/apcveval.x
new file mode 100644
index 00000000..09e5beb5
--- /dev/null
+++ b/noao/twodspec/apextract/apcveval.x
@@ -0,0 +1,19 @@
+include <math/curfit.h>
+
+# AP_CVEVAL -- Interface to CVEVAL that avoids extrapolation.
+# This is necessary because if the tracing was truncated due to loss
+# of the profile the trace limits will be smaller than the image axis.
+# In the longer term the aperture limits along the dispersion should be
+# used to limit the extent of the spectrum.
+
+real procedure ap_cveval (cv, x)
+
+pointer cv #I CURFIT pointer
+real x #I Point to be evaluated.
+
+real x1, cvstatr(), cveval()
+
+begin
+ x1 = min (max (x, cvstatr(cv,CVXMIN)), cvstatr(cv,CVXMAX))
+ return (cveval (cv, x1))
+end