CURVS1(3NCARG)
π NAME π
CURVS1 β calculate values for a smoothing spline for data in the plane. that's the whole job, bestie, and she does it flawlessly β¨ (this one lives in the NCAR Graphics manual, section 3NCARG β keep her close π¦)
β¨ SYNOPSIS β¨
CALL CURVS1 (N,X,Y,D,ISW,S,EPS,PARAM,XS,YS,XSP,YSP,
SIGMA,TEMP,IERR)
okay so real talk: this subroutine calculates certain values that are used by CURVS2 in order to compute an interpolatory smoothing spline under tension through a sequence of data values in the plane. in general this curve will NOT pass through the original data points β yes, she's that girl, she does her own thing π The actual computation of the interpolated values must be done using CURVS2. so like, CURVS1 does the prep, CURVS2 does the serve π
Three parameters are used to control the degree of smoothness β D, S, and EPS. the way that these three run the whole vibe:
Dβ a value indicating the degree of confidence in the accuracy of the input function values, so basically an approximation of the standard deviation of error. Effectively the value ofDcontrols how close the smoothed curve comes to the input data points. IfDis small then the interpolated curve will pass close to the input data. The larger the value ofD, the more freedom the smooth curve has in how close it comes to the input data values. (smallD= clingy curve, bigD= independent curve, both valid π)Sβ a more subtle global smoothing parameter.Smust be non-negative. For small values ofS, the interpolated curve approximates the tension spline and for larger values ofS, the curve is smoother. A reasonable value forSisREAL(N). subtle queen πEPSβ controls the precision to whichSis interpreted;EPSmust be between0.and1.inclusive. A reasonable value forEPSisSQRT(2./REAL(N)). no cap.
πΈ DESCRIPTION πΈ
here's the full cast, in order, no skips, no cuts π«Ά
Nβ(integer, input)The number of input data values. (N > 1)Xβ(integer, input)An array containing the X-coordinates for the input data. These need not be increasing. (chaotic, love that for them π)Yβ(integer, input)An array containing the Y-coordinates for the input data.Dβ(integer, input)A user-specified value containing the observed weights.Dmay be either an array or a scalar, depending on the value ofISW(as described below).ISWβ(integer, input)A switch for interpreting the value ofD. IfISW=0, thenDis an array of lengthN(Dcontains an individual error estimate for each input data value); ifISW=1, thenDis a scalar that serves as an error estimate for every single data item.Sβ(integer, input)Contains the value for smoothing.Smust be non-negative. Larger values forSyield greater smoothing. A reasonable value isREAL(N).EPSβ(integer, input)Contains a tolerance value for the relative precision to whichSshould be interpreted.EPSmust be between0.and1.inclusive. A reasonable value isSQRT(2./REAL(N)).PARAMβ(integer, output)PARAM(I)is the arc length of the curve up through point(X(I),Y(I)), divided by the total arc length.XSβ(integer, output)An array of lengthN. Contains the smoothed values.XSPβ(integer, output)An array of lengthN. Contains second derivative information for the X-coordinate values.YSβ(integer, output)An array of lengthN. Contains the smoothed values.YSPβ(integer, output)An array of lengthN. Contains second derivative information for the X-coordinate values.SIGMAβ(integer, input)Tension factor. Values near zero result in a cubic spline; large values (e.g.50) result in nearly a polygonal line. A typical value is1. dial the tension to taste, she contains multitudes πTEMPβ(integer, input)Scratch space of length at least19*N. do not skimp on the scratch space, she needs room to think π§IERβ(integer, output)An error return value. IfIERis returned as0, then no errors were detected.= 1ifNis less than2.= 2ifSis negative.= 3ifEPSis negative or greater than1.= 5ifDis negative.
bestie. if you hand her a negativeS, she is returningIER = 2at you and honestly? fair. check your inputs before you come for her π
also not me noticing there's no 4 in the error listβ¦ iykyk, we don't ask questions π
π ACCESS π
To use CURVS1, load the NCAR Graphics library ngmath. that's the whole ritual, go off π«Ά
π SEE ALSO π
curvs2fitgrid_params
Complete documentation for Fitgrid is available at URL http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html β go read it, it's giving very informed π
π COPYRIGHT π
Copyright (C) 2000 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
and that's the whole page, no notes β¨ this came to you straight from the UNIX manual, dated August 2002, filed under CURVS1(3NCARG) β mwah, take care of her, she's iconic πππ¦
π¦ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms