diff options
Diffstat (limited to 'math/bevington/man')
26 files changed, 781 insertions, 0 deletions
diff --git a/math/bevington/man/agauss.3m b/math/bevington/man/agauss.3m new file mode 100644 index 00000000..4f66e826 --- /dev/null +++ b/math/bevington/man/agauss.3m @@ -0,0 +1,24 @@ +.TH AGAUSS 3M +.SH NAME +agauss +.SH DESCRIPTION +function agauss.f + +source + Bevington, page 48. + +purpose + evaluate integral of Gaussian probability function + +usage + result = agauss (x, averag, sigma) + +description of parameters + x - limit for integral + averag - mean of distribution + sigma - standard deviation of distribution + integration range is averag +/- z*sigma + where z = abs(x-averag)/sigma + +subroutines and function subprograms required + none diff --git a/math/bevington/man/area.3m b/math/bevington/man/area.3m new file mode 100644 index 00000000..1505ef4d --- /dev/null +++ b/math/bevington/man/area.3m @@ -0,0 +1,25 @@ +.TH AREA 3M +.SH NAME +area +.SH DESCRIPTION +function area.f + +source + Bevington, pages 272-273. + +purpose + integrate the area beneath a set of data points + +usage + result = area (x, y, npts, nterms) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + npts - number of pairs of data points + nterms - number of terms in fitting polynomial + +subroutines and function subprograms required + integ (x, y, nterms, i1, x1, x2 sum) + fits a polynomial with nterms starting at i1 + and integrates area from x1 to x2 diff --git a/math/bevington/man/chifit.3m b/math/bevington/man/chifit.3m new file mode 100644 index 00000000..ec8f7f2c --- /dev/null +++ b/math/bevington/man/chifit.3m @@ -0,0 +1,44 @@ +.TH CHIFIT 3M +.SH NAME +chifit +.SH DESCRIPTION +subroutine chifit.f + +source + Bevington, pages 228-231. + +purpose + make least-squares fit to a non-linear function + with a parabolic expansion of chi square + +usage + call chifit (x, y, sigmay, npts, nterms, mode, a, deltaa, + sigmaa, yfit, chisqr) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + sigmay - array of standard deviations for y data points + npts - number of pairs of data points + nterms - number of parameters + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + a - array of parameters + deltaa - array of increments for parameters a + sigmaa - array of standard deviations for parameters a + yfit - array of calculated values of y + chisqr - reduced chi square for fit + +subroutines and function subprograms required + functn (x, i, a) + evaluates the fitting function for the ith term + fchisq (y, sigmay, npts, nfree, mode, yfit) + evaluates reduced chi squared for fit to data + matinv (array, nterms, det) + inverts symmetric two-dimension matrix of degree nterms + and calculates its determinant + +comments + valid for nterms up to 10 diff --git a/math/bevington/man/curfit.3m b/math/bevington/man/curfit.3m new file mode 100644 index 00000000..799f0545 --- /dev/null +++ b/math/bevington/man/curfit.3m @@ -0,0 +1,49 @@ +.TH CURFIT 3M +.SH NAME +curfit +.SH DESCRIPTION +subroutine curfit.f + +source + Bevington, pages 237-239. + +purpose + make least-squares fit to a non-linear function + with a linearization of the fitting function + +usage + call curfit (x, y, sigmay, npts, nterms, mode, a, deltaa, + sigmaa, flamda, yfit, chisqr) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + sigmay - array of standard deviations for y data points + npts - number of pairs of data points + nterms - number of parameters + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + a - array of parameters + deltaa - array of increments for parameters a + sigmaa - array of standard deviations for parameters a + flamda - proportion of gradient search included + yfit - array of calculated values of y + chisqr - reduced chi square for fit + +subroutines and function subprograms required + functn (x, i, a) + evaluates the fitting function for the ith term + fchisq (y, sigmay, npts, nfree, mode, yfit) + evaluates reduced chi squared for fit to data + fderiv (x, i, a, deltaa, nterms, deriv) + evaluates the derivatives of the fitting function + for the ith term with respect to each parameter + matinv (array, nterms, det) + inverts symmetric two-dimension matrix of degree nterms + and calculates its determinant + +comments + valid for nterms up to 10 + set flamda = 0.001 at beginning of search diff --git a/math/bevington/man/determ.3m b/math/bevington/man/determ.3m new file mode 100644 index 00000000..5ec86d06 --- /dev/null +++ b/math/bevington/man/determ.3m @@ -0,0 +1,25 @@ +.TH DETERM 3M +.SH NAME +determ +.SH DESCRIPTION +function determ.f + +source + Bevington, page 294. + +purpose + calculate the determinant of a square matrix + +usage + result = determ (array, norder) + +description of parameters + array - matrix + norder - order of determinant (degree of matrix) + +subroutines and function subprograms required + none + +comments + this subprogram destroys the input matrix array + valid for norder up to 10 diff --git a/math/bevington/man/factor.3m b/math/bevington/man/factor.3m new file mode 100644 index 00000000..1127c5d0 --- /dev/null +++ b/math/bevington/man/factor.3m @@ -0,0 +1,20 @@ +.TH FACTOR 3M +.SH NAME +factor +.SH DESCRIPTION +function factor.f + +source + Bevington, page 32. + +purpose + calculates factorial function for integers + +usage + result = factor (n) + +description of parameters + n - integer argument + +subroutines and function subprograms required + none diff --git a/math/bevington/man/fchisq.3m b/math/bevington/man/fchisq.3m new file mode 100644 index 00000000..0511409b --- /dev/null +++ b/math/bevington/man/fchisq.3m @@ -0,0 +1,29 @@ +.TH FCHISQ 3M +.SH NAME +fchisq +.SH DESCRIPTION +function fchisq.f + +source + Bevington, page 194. + +purpose + evaluate reduced chi square for fit of data + fchisq = sum ((y-yfit)**2 / sigma**2) / nfree + +usage + result = fchisq (y, sigmay, npts, nfree, mode, yfit) + +description of parameters + y - array of data points + sigmay - array of standard deviations for data points + npts - number of data points + nfree - number of degrees of freedom + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + yfit - array of calculated values of y + +subroutines and function subprograms required + none diff --git a/math/bevington/man/fderiv.3m b/math/bevington/man/fderiv.3m new file mode 100644 index 00000000..d9c88aeb --- /dev/null +++ b/math/bevington/man/fderiv.3m @@ -0,0 +1,27 @@ +.TH FDERIV 3M +.SH NAME +fderiv +.SH DESCRIPTION +subroutine fderiv.f (non-analytical) + +source + Bevington, page 242. + +purpose + evaluate derivatives of function for least-squares search + for arbitrary function given by functn + +usage + call fderiv (x, i, a, deltaa, nterms, deriv) + +description of parameters + x - array of data points for independent variable + i - index of data points + a - array of parameters + deltaa - array of parameter increments + nterms - number of parameters + deriv - derivatives of function + +subroutines and function subprograms required + functn (x, i, a) + evaluates the fitting function for the ith term diff --git a/math/bevington/man/gamma.3m b/math/bevington/man/gamma.3m new file mode 100644 index 00000000..31939ef3 --- /dev/null +++ b/math/bevington/man/gamma.3m @@ -0,0 +1,21 @@ +.TH GAMMA 3M +.SH NAME +gamma +.SH DESCRIPTION +function gamma.f + +source + Bevington, page 126. + +purpose + calculate gamma function for integers and 1/2-integers + +usage + result = gamma (x) + +description of parameters + x - integer or half-integer + +subroutines or function subprograms required + factor (n) + calculates n factorial for integers diff --git a/math/bevington/man/gradls.3m b/math/bevington/man/gradls.3m new file mode 100644 index 00000000..681c93f4 --- /dev/null +++ b/math/bevington/man/gradls.3m @@ -0,0 +1,40 @@ +.TH GRADLS 3M +.SH NAME +gradls +.SH DESCRIPTION +subroutine gradls.f + +source + Bevington, pages 220-222. + +purpose + make gradient-search least-squares fit to data with a + specified function which is not linear in coefficients + +usage + call gradls (x, y, sigmay, npts, nterms, mode, a, deltaa, + yfit, chisqr) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + sigmay - array of standard deviations for y data points + npts - number of pairs of data points + nterms - number of parameters + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + a - array of parameters + deltaa - array of increments for parameters a + yfit - array of calculated values of y + chisqr - reduced chi square for fit + +subroutines and function subprograms required + functn (x, i, a) + evaluates the fitting function for the ith term + fchisq (y, sigmay, npts, nfree, mode, yfit) + evaluates reduced chi squared for fit to data + +comments + valid for nterms up to 10 diff --git a/math/bevington/man/gridls.3m b/math/bevington/man/gridls.3m new file mode 100644 index 00000000..331a566c --- /dev/null +++ b/math/bevington/man/gridls.3m @@ -0,0 +1,41 @@ +.TH GRIDLS 3M +.SH NAME +gridls +.SH DESCRIPTION +subroutine gridls.f + +source + Bevington, pages 212-213. + +purpose + make grid-search least-squares fit to data with specified + function which is not linear in coefficients + +usage + call gridls (x, y, sigmay, npts, nterms, mode, a, deltaa, + sigmaa, yfit, chisqr) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + sigmay - array of standard deviations for y data points + npts - number of pairs of data points + nterms - number of parameters + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + a - array of parameters + deltaa - array of increments for parameters a + sigmaa - array of standard deviations for parameters a + yfit - array of calculated values of y + chisqr - reduced chi square for fit + +subroutines and function subprograms required + functn (x, i, a) + evaluates the fitting function for the ith term + fchisq (y, sigmay, npts, nfree, mode, yfit) + evaluates reduced chi squared for fit to data + +comments + deltaa values are modified by the program diff --git a/math/bevington/man/integ.3m b/math/bevington/man/integ.3m new file mode 100644 index 00000000..e6200645 --- /dev/null +++ b/math/bevington/man/integ.3m @@ -0,0 +1,28 @@ +.TH INTEG 3M +.SH NAME +integ +.SH DESCRIPTION +subroutine integ.f + +source + Bevington, page 274. + +purpose + integrate the area beneath two data points + +usage + call integ (x, y, nterms, i1, x1, x2, sum) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + nterms - number of terms in fitting polymonial + i1 - first data point for fitting polynomial + x1 - first value of x for integration + x2 - final value of x for integration + +subroutines and function subprograms required + none + +comments + valid for nterms up to 10 diff --git a/math/bevington/man/interp.3m b/math/bevington/man/interp.3m new file mode 100644 index 00000000..0a25b2b0 --- /dev/null +++ b/math/bevington/man/interp.3m @@ -0,0 +1,29 @@ +.TH INTERP 3M +.SH NAME +interp +.SH DESCRIPTION +subroutine interp.f + +source + Bevington, pages 266-267. + +purpose + interpolate between data points to evaluate a function + +usage + call interp (x, y, npts, nterms, xin, yout) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + npts - number of pairs of data points + nterms - number of terms in fitting polynomial + xin - input value of x + yout - interpolated value of y + +subroutines and function subprograms required + none + +comments + valid for nterms up to 10 + value of nterms may be modified by the program diff --git a/math/bevington/man/legfit.3m b/math/bevington/man/legfit.3m new file mode 100644 index 00000000..efe61c07 --- /dev/null +++ b/math/bevington/man/legfit.3m @@ -0,0 +1,49 @@ +.TH LEGFIT 3M +.SH NAME +legfit +.SH DESCRIPTION +subroutine legfit.f + +source + Bevington, pages 155-157. + +purpose + make least-squares fit to data with a Legendre polynomial + y = a(1) + a(2)*x + a(3)*(3x**2-1)/2 + ... + = a(1) * (1. + b(2)*x + b(3)*(3x**2-1)/2 + ... ) + where x = cos(theta) + +usage + call legfit (theta, y, sigmay, npts, norder, neven, mode, + ftest, yfit, a, sigmaa, b, sigmab, chisqr) + +description of parameters + theta - array of angles (in degrees) of the data points + y - array of data points for dependent variable + sigmay - array of standard deivations for y data points + npts - number of pairs of data points + norder - highest order of polynomial (number of terms - 1) + neven - determines odd or even character of polynomial + +1 fits only to even terms + 0 fits to all terms + -1 fits only to odd terms (plus constant term) + mode - determines mode of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + ftest - array of values of f(l) for an f test + yfit - array of calculated values of y + a - array of coefficients of polynomial + sigmaa - array of standard deviations for coefficients + b - array of normalized relative coefficients + sigmab - array of std. deviations of relative coefficients + chisqr - reduced chi square for fit + +subroutines and function subprograms required + matinv (array, nterms, det) + inverts symmetric two-dimension matrix of degree nterms + and calculates its determinant + +comments + valid for npts up to 100 and order up to 9 + one source line modified - cos substituted for dcos diff --git a/math/bevington/man/linfit.3m b/math/bevington/man/linfit.3m new file mode 100644 index 00000000..e6e63f75 --- /dev/null +++ b/math/bevington/man/linfit.3m @@ -0,0 +1,33 @@ +.TH LINFIT 3M +.SH NAME +linfit +.SH DESCRIPTION +subroutine linfit.f + +source + Bevington, pages 104-105. + +purpose + make least-squares fit to a data set with a straight line + +usage + call linfit (x, y, sigmay, npts, mode, a, sigmaa, + b, sigmab, r) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + sigmay - array of standard deviations for y data points + npts - number of pairs of data points + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + a - y intercept of fitted straight line + sigmaa - standard deviation of a + b - slope of fitted straight line + sigmab - standard deviation of b + r - linear correlation coefficient + +subroutines and function subprograms required + none diff --git a/math/bevington/man/matinv.3m b/math/bevington/man/matinv.3m new file mode 100644 index 00000000..6b2d1c44 --- /dev/null +++ b/math/bevington/man/matinv.3m @@ -0,0 +1,25 @@ +.TH MATINV 3M +.SH NAME +matinv +.SH DESCRIPTION +subroutine matinv.f + +source + Bevington, pages 302-303. + +purpose + invert a symmetric matrix and calculate its determinant + +usage + call matinv (array, norder, det) + +description of parameters + array - input matrix which is replaced by its inverse + norder - degree of matrix (order of determinant) + det - determinant of input matrix + +subroutines and function subprograms required + none + +comments + valid for norder up to 10 diff --git a/math/bevington/man/pbinom.3m b/math/bevington/man/pbinom.3m new file mode 100644 index 00000000..344a62b3 --- /dev/null +++ b/math/bevington/man/pbinom.3m @@ -0,0 +1,23 @@ +.TH PBINOM 3M +.SH NAME +pbinom +.SH DESCRIPTION +function pbinom.f + +source + Bevington, page 31. + +purpose + evaluate binomial probability coefficient + +usage + result = pbinom (nobs, ntotal, prob) + +description of parameters + nobs - number of items observed + ntotal - total number of items + prob - probability of observing each item + +subroutines and function subprograms required + factor (n) + calculates n factorial for integers diff --git a/math/bevington/man/pchisq.3m b/math/bevington/man/pchisq.3m new file mode 100644 index 00000000..1f4c6742 --- /dev/null +++ b/math/bevington/man/pchisq.3m @@ -0,0 +1,26 @@ +.TH PCHISQ 3M +.SH NAME +pchisq +.SH DESCRIPTION +function pchisq.f + +source + Bevington, pages 192-193. + +purpose + evaluate probability for exceeding chi square + +usage + result = pchisq (chisqr, nfree) + +description of parameters + chisqr - comparison value of reduced chi square + nfree - number of degrees of freedom + +subroutines and function subprograms required + gamma (x) + calculates gamma function for integers and 1/2-integers + +comments + calculation is approximate for nfree odd and + chi square greater than 50 diff --git a/math/bevington/man/pcorre.3m b/math/bevington/man/pcorre.3m new file mode 100644 index 00000000..832c6640 --- /dev/null +++ b/math/bevington/man/pcorre.3m @@ -0,0 +1,22 @@ +.TH PCORRE 3M +.SH NAME +pcorre +.SH DESCRIPTION +function pcorre.f + +source + Bevington, pages 124-125. + +purpose + evaluate probability of no correlation between 2 variables + +usage + result = pcorre (r, npts) + +description of parameters + r - linear correlation coefficient + npts - number of data points + +subroutines and function subprograms required + gamma (x) + calculates gamma function for integers and 1/2-integers diff --git a/math/bevington/man/pgauss.3m b/math/bevington/man/pgauss.3m new file mode 100644 index 00000000..4f0c7c7d --- /dev/null +++ b/math/bevington/man/pgauss.3m @@ -0,0 +1,22 @@ +.TH PGAUSS 3M +.SH NAME +pgauss +.SH DESCRIPTION +function pgauss.f + +source + Bevington, page 45. + +purpose + evaluate Gaussian probability function + +usage + result = pgauss (x, averag, sigma) + +description of parameters + x - value for which probability is to be evaluated + averag - mean of distribution + sigma - standard deviation of distribution + +subroutines and function subprograms required + none diff --git a/math/bevington/man/ploren.3m b/math/bevington/man/ploren.3m new file mode 100644 index 00000000..dfd485f5 --- /dev/null +++ b/math/bevington/man/ploren.3m @@ -0,0 +1,22 @@ +.TH PLOREN 3M +.SH NAME +ploren +.SH DESCRIPTION +function ploren.f + +source + Bevington, page 51. + +purpose + evaluate Lorentzian probability function + +usage + result = ploren (x, averag, width) + +description of parameters + x - value for which probability is to be evaluated + averag - mean of distribution + width - full width at half maximum of distribution + +subroutines and function subprograms required + none diff --git a/math/bevington/man/polfit.3m b/math/bevington/man/polfit.3m new file mode 100644 index 00000000..9553e619 --- /dev/null +++ b/math/bevington/man/polfit.3m @@ -0,0 +1,36 @@ +.TH POLFIT 3M +.SH NAME +polfit +.SH DESCRIPTION +subroutine polfit.f + +source + Bevington, pages 140-142. + +purpose + make least-squares fit to data with a polynomial curve + y = a(1) + a(2)*x + a(3)*x**2 + a(3)*x**3 + . . . + +usage + call polfit (x, y, sigmay, npts, nterms, mode, a, chisqr) + +description of parameters + x - array of data points for independent variable + y - array of data points for dependent variable + sigmay - array of standard deviations for y data points + npts - number of pairs of data points + nterms - number of coefficients (degree of polynomial + 1) + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + a - array of coefficients of polynomial + chisqr - reduced chi square for fit + +subroutines and function subprograms required + determ (array, norder) + evaluates the determinant of a symetrical + two-dimension matrix of order norder + +comments + valid for nterms up to 10 diff --git a/math/bevington/man/ppoiss.3m b/math/bevington/man/ppoiss.3m new file mode 100644 index 00000000..0197768f --- /dev/null +++ b/math/bevington/man/ppoiss.3m @@ -0,0 +1,22 @@ +.TH PPOISS 3M +.SH NAME +ppoiss +.SH DESCRIPTION +function ppoiss.f + +source + Bevington, page 39. + +purpose + evaluate Poisson probability function + +usage + result = ppoiss (nobs, averag) + +description of parameters + nobs - number of items observed + averag - mean of distribution + +subroutines and function subprograms required + factor (n) + calculates n factorial for integers diff --git a/math/bevington/man/regres.3m b/math/bevington/man/regres.3m new file mode 100644 index 00000000..e8cf076d --- /dev/null +++ b/math/bevington/man/regres.3m @@ -0,0 +1,49 @@ +.TH REGRES 3M +.SH NAME +regres +.SH DESCRIPTION +subroutine regres.f + +source + Bevington, pages 172-175. + +purpose + make mulitple linear regression fit to data with specified + function which is linear in coefficients + +usage + call regres (x, y, sigmay, npts, nterms, m, mode, yfit, + a0, a, sigma0, sigmaa, r, rmul, chisqr, ftest) + +description of parameters + x - array of points for independent variable + y - array of points for dependent variable + sigmay - array of standard deviations for y data points + npts - number of pairs of data points + nterms - number of coefficients + m - array of inclusion/rejection criteria for fctn + mode - determines method of weighting least-squares fit + +1 (instrumental) weight(i) = 1./sigmay(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1./y(i) + yfit - array of calculated values of y + a0 - constant term + a - array of coefficients + sigma0 - standard deviation of a0 + sigmaa - array of standard deviations for coefficients + r - array of linear correlation coefficients + rmul - multiple linear correlation coefficient + chisqr - reduced chi square for fit + ftest - value of f for test of fit + +subroutines and function subprograms required + fctn (x, i, j, m) + evaluates function for the jth term and the ith data + point using array m to specify terms in function + matinv (array, nterms, det) + inverts symmetric two-dimension matrix of degree nterms + and calculates its determinant + +comments + valid for npts up to 100 and nterms up to 10 + one source line modified - sigmaa substituted for sigmaag diff --git a/math/bevington/man/smooth.3m b/math/bevington/man/smooth.3m new file mode 100644 index 00000000..6db69d22 --- /dev/null +++ b/math/bevington/man/smooth.3m @@ -0,0 +1,21 @@ +.TH SMOOTH 3M +.SH NAME +smooth +.SH DESCRIPTION +subroutine smooth.f + +source + Bevington, page 260. + +purpose + smooth a set of data points by averaging adjacent channels + +usage + call smooth (y, npts) + +description of parameters + y - array of data points + npts - number of data points + +subroutines and function subprograms required + none diff --git a/math/bevington/man/xfit.3m b/math/bevington/man/xfit.3m new file mode 100644 index 00000000..53ed8ae8 --- /dev/null +++ b/math/bevington/man/xfit.3m @@ -0,0 +1,29 @@ +.TH XFIT 3M +.SH NAME +xfit +.SH DESCRIPTION +subroutine xfit.f + +source + Bevington, page 76. + +purpose + calculate mean and estimated errors for set of data points + +usage + call xfit (x, sigmax, npts, mode, xmean, sigmam, sigma) + +description of parameters + x - array of data points + sigmax - array of standard deviations for data points + npts - number of data points + mode - determines method of weighting + +1 (instrumental) weight(i) = 1./sigmax(i)**2 + 0 (no weighting) weight(i) = 1. + -1 (statistical) weight(i) = 1. + xmean - weighted mean + sigmam - standard deviation of mean + sigma - standard deviation of data + +subroutines and function subprograms required + none |