Freudenreich AstroContrib Library
The following is a listing of the entire contents of this library for IDL.
Click on an individual procedure name to view its header and
source code. This listing
is a shortened form of the much longer
entire library help file. This may be handy for
text searchs, be beware that some of these are huge and may take a long
time to load or even crash your browser.
Last modified: Thu Dec 21 21:17:11 2000.
List of Routines
- AUTOHIST Draws a histogram using automatic bin-sizing. AUTOHIST chooses a number of bins (initially, SQRT(2*N). If this leads to a histogram in which > 1/5 of the central 50% of the bins are empty, it decreases the number of bins and tries again. The minimum # bins is 5. The max=199. Called by HISTOGAUSS and HALFAGAUSS. Note that the intrinsic HISTOGRAM function is *not* used.
- BBOOTSTRAP 1-parameter bootstrap calculation of function FUNCT
- BIWEIGHT_MEAN Calculate the center and dispersion (like mean and sigma) of a distribution using bisquare weighting.
- BOOT_BINDATA Groups data into NBINS bins of equal size, and finds the robust mean of each bin. The X value per bin is not necessarily = bin-center. The boot- strap method is used. If a bin has fewer than 6 points, the biweighted mean is calculated; otherwise, a robust line is fitted to the data.
- BOOT_MEAN Calculate the Bootstrap Mean. (Also see BBOOTSTRAP.)
- BOOT_POLYFIT Bootstrap polynomial fit to data.
- BOOT_XYFIT Bootstrap linear fit to data in which there are errors in both Y and X, but the measurement errors are not available. Calculates the bisector of the Y vs X and X vs Y regression.
- CHAINSAW Remove isolated HIGH elements from a 2D array, replacing them with a local surface fit.
- CUBEROOT Real roots of a cubic equation. Complex roots set to -1.0e30. Called by HALFAGAUSS.
- FITAGAUSS A version of CURVEFIT that fits a Gaussian to the data, using the mean absolute deviation rather than the chi^2. DESIGNED ONLY FOR USE BY HISTOGAUSS AND HALFAGAUSS. EMPLOY ELSEWHERE AT USER'S RISK.
- FITXYERRS[1] Part of FITXYERRS.
- FITXYERRS[2] Linear fit to data in which there are errors in both Y and X, and possibly outliers or points with true errors much larger than the measurement errors. It is outlier-resistant but not as resistant as ROBUST_LINEFIT. Uncertainties are calculated using the bootstrap
- GAUSSFUNC Part of FITAGAUSS Evaluates a Gausian and its partial derivative for FITAGAUSS
- HALFAGAUSS Histogramming a distribution that can be characterized by a Gaussian with one heavy tail and returns the parameters of the Gaussian. Draws the histogram, the Gaussian, and the smoothed residuals. If a plausible fit to a Gaussian cannot be made (typically, if the distribution has a sharp edge or insufficient data near the mode) the parameters of the Gaussian are estimated. In this case an asterisk precedes the label of mean and width drawn on the plot.
- HISTOGAUSS Histograms data and overlays it with a Gaussian. Draws the mean, sigma, and number of points on the plot.
- LOESS Map-smoothing using the loess method (a local, weighted, polynomial fit in two dimensions). Allows fits only up to degree 2 in X and Y.
- LOWESS Robust smoothing of 1D data. A non-parametric way of drawing a smooth curve to represent data. (For 2D (map) data, use LOESS.)
- MAPFITW Fit a 2D surface to a map through call to REGRESS. Each pixel in the map may be given a weight. (If pixels have equal weight, SURFACE_FIT
- MED Compute the median of an array, which may be of even length.
- MEDSMOOTH Median smoothing of a vector, including pointe near its ends.
- PERMUTE Randomly permute the elements of a vector
- PERMUTEST Apply Fisher's Permutation Test for the equality of the means of two samples. This method is non-parametric and exact--and slow.
- PLANEFIT Least-squares fit of a plane to a set of (X,Y,Z) points: Z=R(0)+R(1)*X+R(2)*Y
- POINT_REMOVER Remove isolated HIGH SIGNAL/NOISE elements from a 2D array, replacing them with a local median. This routine iterates until convergence or a user-supplied maximum number. This is NOT a low-pass filter. Only points passing the S/N cut are affected.
- POLY4PEAK Finds the maximum of a 4th degree polynomial c0+c1x+c2x^2+c3x^3+c4x^4 Called by HALFAGAUSS INPUT: COEFFICIENTS OF POLYNOMIAL. RETURNS: THE LOCATION OF THE MAX.
- QUARTICFIT Fit a general quadratic surface: Z=a+bX+cX^2+dXY+eY+fY^2
- RESISTANT_MEAN An outlier-resistant determination of the mean and its standard deviation. It trims away outliers using the median and the median absolute deviation.
- ROBUST_BIN2D Bins data in a 2-dimensional array suitable for surface or contour plots. Cells with more than 2 entries are robustly averaged to remove
- ROBUST_BINDATA Groups data into NBINS bins of equal size, and finds the robust mean of each bin. If there are enough pts in a bin, a line is fitted to the data. The bootstrap method is used to determine the uncertainty of the bin averages.
- ROBUST_BOXCAR Calculate robust boxcar averages of fixed number of points. One average is calculated per NPER points. (Remaining points go into the last average.) Biweights are used. The same weights are applied to the X variable in calculating its average, so that the (X,Y) correspondence
- ROBUST_CORR Derive an outlier-resistant measure of the correlation coefficient of variables X and Y.
- ROBUST_LINEFIT An outlier-resistant two-variable linear regression. Either Y on X or, for the case in which there is no true independent variable, the bisecting line of Y vs X and X vs Y is calculated. No knowledge of the errors of the input points is assumed.
- ROBUST_PLANEFIT An outlier-resistant fit to Z = a + bX + cY
- ROBUST_POLY_FIT An outlier-resistant polynomial fit.
- ROBUST_REGRESS An outlier-resistant linear regression. Calls REGRESS.
- ROBUST_SIGMA Calculate a resistant estimate of the dispersion of a distribution. For an uncontaminated distribution, this is identical to the standard
- ROB_CHECKFIT Used by ROBUST_... routines to determine the quality of a fit and to return biweights.
- ROB_MAPFIT Robustly fit a polynomial surface to a 2D floating-point array
- ROB_QUARTICFIT An outlier-resistant fit to Z = a + bX + cX^2 + dY +eY^2 + fX*Y.
- RPLOT Autoscaled plot of glitchy data. Short horizontal bars on the left of the plot denote the allowed Y range.
- R_DILATE Replace pixel values with the neighborhood maximum. Like DILATE, but 1. takes floating-point maps 2. ignores pixels <= a minimum value/
- R_ERODE Replace pixel values with the neighborhood minimum. Like ERODE, but 1. takes floating-point maps 2. ignores pixels <= MINVAL
- XYFIT Returns the bisecting line of the regressions: Y on X and X on Y. OR the mean of the two lines, with FX and FY the weights. CALLED BY FITXYERRS.