aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/apextract/apcveval.x
blob: 09e5beb5bc2ce7fe9a69a14a093db1c57d1cce5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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