From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- noao/twodspec/apextract/apcveval.x | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 noao/twodspec/apextract/apcveval.x (limited to 'noao/twodspec/apextract/apcveval.x') 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 + +# 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 -- cgit