1CURVPS(3NCARG)                   NCAR GRAPHICS                  CURVPS(3NCARG)
2
3
4

NAME

6       CURVPS  -  calculate values for a smoothing spline for a periodic func‐
7       tion.
8

SYNOPSIS

10       CALL CURVPS (N, X, Y, P, D, ISW, S, EPS, YS, YSP, SIGMA, TEMP, IER)
11
12       This subroutine calculates certain values that are used  by  CURVP2  in
13       order  to  compute  an  interpolatory  smoothing  spline  under tension
14       through a sequence of functional values for a  periodic  function.  The
15       actual  computation  of  the  interpolated  values  must  be done using
16       CURVP2.
17
18       Three parameters are used to control the degree of smoothness -- D,  S,
19       and EPS.
20
21       The  parameter  D is a value indicating the degree of confidence in the
22       accuracy of the input function values -- it should be an  approximation
23       of the standard deviation of error. Effectively the value of D controls
24       how close the smoothed curve comes to the input data points.  If  D  is
25       small  then  the  interpolated curve will pass close to the input data.
26       The larger the value of D, the more freedom the smooth curve has in how
27       close it comes to the input data values.
28
29       S  is a more subtle global smoothing parameter. S must be non-negative.
30       For small values of S, the curve approximates the  tension  spline  and
31       for larger values of S, the curve is smoother. A reasonable value for S
32       is REAL(N).
33
34       EPS controls the precision to which  S  is  interpreted;  EPS  must  be
35       between   0.   and   1.  inclusive.  A  reasonable  value  for  EPS  is
36       SQRT(2./REAL(N)).
37

DESCRIPTION

39       N           (integer, input) The number of input data values. (N > 1)
40
41       X           (integer, input) An array containing the abscissae for  the
42                   input function.
43
44       Y           (integer,  input) An array containing the functional values
45                   for the input function -- Y(K) is the functional  value  at
46                   X(K) for K=1,N.
47
48       P           (real, input) The period of the function.
49
50       D           (integer,  input)  A  user-specified  value  containing the
51                   observed weights. D may be either an  array  or  a  scalar,
52                   depending on the value of ISW (as described below).
53
54       ISW         (integer,  input) A switch for interpreting the value of D.
55                   If ISW=0, then D is an array of length  N  (D  contains  an
56                   individual  error  estimate  for each input data value); if
57                   ISW=1, then D is a scalar that serves as an error  estimate
58                   for every single data item.
59
60       S           (integer,  input)  Contains the value for smoothing. S must
61                   be non-negative.  Larger values for S yield greater smooth‐
62                   ing. A reasonable value is REAL(N).
63
64       EPS         (integer,  input)  Contains a tolerance value for the rela‐
65                   tive precision to which S should be interpreted.  EPS  must
66                   be  between  0.  and  1.  inclusive.  A reasonable value is
67                   SQRT(2./REAL(N)).
68
69       YS          (integer, input) An array of length N.
70
71       YSP         (integer, input) An array of length N.
72
73       SIGMA       (integer, input) Tension factor. Values near zero result in
74                   a  cubic  spline; large values (e.g. 50) result in nearly a
75                   polygonal line. A typical value is 1.
76
77       TEMP        (integer, input) Scratch space.
78
79       IER         (integer, input) An error return value. If IER is  returned
80                   as 0, then no errors were detected.
81
82                   = 1 if N is less than 2.
83                   = 2 if S is negative.
84                   = 3 if EPS is negative or greater than 1.
85                   = 4 if X values are not strictly increasing.
86                   = 5 if D is negative.
87                   = 6 if P is less than or equal to X(N)-X(1).
88

ACCESS

90       To use CURVPS, load the NCAR Graphics library ngmath.
91

SEE ALSO

93       curvp2, fitgrid_params.
94
95       Complete documentation for Fitgrid is available at URL
96       http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html
97
99       Copyright (C) 2000
100       University Corporation for Atmospheric Research
101
102       The use of this Software is governed by a License Agreement.
103
104
105
106UNIX                              March 1998                    CURVPS(3NCARG)
Impressum