diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /math/bevington/smooth.f | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/bevington/smooth.f')
-rw-r--r-- | math/bevington/smooth.f | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/math/bevington/smooth.f b/math/bevington/smooth.f new file mode 100644 index 00000000..19c2c457 --- /dev/null +++ b/math/bevington/smooth.f @@ -0,0 +1,29 @@ +c subroutine smooth.f +c +c source +c Bevington, page 260. +c +c purpose +c smooth a set of data points by averaging adjacent channels +c +c usage +c call smooth (y, npts) +c +c description of parameters +c y - array of data points +c npts - number of data points +c +c subroutines and function subprograms required +c none +c + subroutine smooth (y,npts) + dimension y(1) +11 imax=npts-1 + yi=y(1) +21 do 24 i=1,imax + ynew=(yi+2.*y(i)+y(i+1))/4. + yi=y(i) +24 y(i)=ynew +25 y(npts)=(yi+3.*y(npts))/4. + return + end |