Meron Library

This page is a listing of the entire contents of this library for IDL. This listing is the long version. Viewing the much more compact listing may be handier.

[Go Back to Main IDL Libraries Search Page]


Last modified: Thu Dec 21 21:18:41 2000.

List of Routines


Routine Descriptions

ABGRAD

[Next Routine] [List of Routines]
 NAME:
	ABGRAD
 VERSION:
	3.0
 PURPOSE:
	Calculates the absolute value of the gradient of a function represented
	as an array of values.  Works for 1-7 dimensions.
 CATEGORY:
	Array Manipulation.
 CALLING SEQUENCE:
	Result = ABGRAD( ARR [, DELTA])
 INPUTS:
    ARR
	Array, numeric, number of dimensions can be 1 through 7.
 OPTIONAL INPUT PARAMETERS:
    DELTA
	Size of step used to calculate the numeric derivatives.  The approx.
	partial derivative in the i-th direction is calculated as
	    (ARR(...,I + DELTA,...) - ARR(...,I - DELTA,...))/(2*DELTA).
	The default value of DELTA is 1l.  If provided, it is rounded to a long
	integer on input.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the absolute value of the gradient as an array of the same size
	and type as ARR.  If ARR is not an array, returns 0.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Due to current limitations of the MAKE_ARRAY system routine, 8 
	dimensions are not allowed.
 PROCEDURE:
	Creates an 7-dimensional array, with dummy leading dimensions, 
	containing the original array.  Generates the differences using the
	SHIFT system routine and strips the dummy dimensions at the end.
	Uses the functions DEFAULT and FPU_FIX from MIDL.
 MODIFICATION HISTORY:
	Created 15-NOV-1991 by Mati Meron.
	Modified 30-AUG-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/abgrad.pro)


ARC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ARC
 VERSION:
	3.0
 PURPOSE:
	Draws a circular arc in the currently defined plot area.  DATA 
	coordinates are used.  The method of drawing depends on the number of
	input parameters provided (see details in CALLING SEQUENCE below).
 CATEGORY:
	General Graphics.
 CALLING SEQUENCE:
	There are two possible modes of operation, and accordingly two 
	different calling sequences:
	Mode 1:
	    ARC, R1, CENTER = CENT, ANGLE = ANG [, optional keywords]
	In this mode an arc with angular measure ANG is drawn around the point
	CENT, in the mathematical-positive direction, starting from point R1.
	Mode 2:
	    ARC, R1, R2, {RADIUS = RAD, ANGLE = ANG} [, optional keywords]
	In this mode the arc is drawn in the mathematical-positive direction,
	from point R1 to point R2.  The arc is either drawn with radius RAD, or
	corresponding to an angle ANG (both RAD and ANG cannot be specified).
 INPUTS:
    R1, R2
	2-dimensional vectors in the [x,y] format, representing points in the 
	plotting area.  R1 is mandatory.  The presence of R2 indicates that 
	Mode 2 is being used.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    CENTER
	2 dimensional vector, arc center location, format [x,y].
	Mandatory in Mode 1, forbidden in Mode 2.
    RADIUS
	Scalar, the radius of the arc.		|
	Forbidden in Mode 1, allowed in Mode 2.	|  In Mode 2
    ANGLE					|  one and only one
	Scalar, the angle measure of the arc.	|  needs to be provided.
	Mandatory in Mode 1, allowed in Mode 2. |
    /DEGREES
	Switch.  Indicates that the angle ANG is given in degrees (default is 
	radians).
    /BIGARC
	Switch.  When drawing in Mode 2, with the radius provided, there are two
	possible arcs that can be drawn,  corresponding to angles smaller and
	bigger than 180 degrees (the sum of both angles is 360 degrees).  By
	default the smaller arc is drawn. Setting BIGARC selects the bigger arc.
    /SYMMETRIC
	Switch.  In Mode 1 causes the arc to be drawn symmetrically on both 
	sides of R1.  Forbidden in Mode 2.
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	The arc will appear as a true circular arc only if the aspect ratio of
	the X to Y axes is 1:1.
	The keywords passed through _EXTRA are transferred to the PLOTS 
	routine.  No keyword verification is performed by ARC.
 PROCEDURE:
	Uses calls to ONE_OF and SHAPE_COCON from MIDL.
	Generates a (2,N) array containing a sufficient number of the arc
	points to yield a smooth curve.  N is variable, depending both on the 
	arc size and on the pixel size of the current output device.
 MODIFICATION HISTORY:
	Created 15-DEC-1991 by Mati Meron.
       Modified 15-DEC-1993 by Mati Meron.  Now ARC takes advantage of the
       keyword inheritance property and accepts all PLOTS keywords.
	Modified 15-JUN-1995 by Mati Meron.  Removed the ALT_EXT keyword which
	is no longer needed (_EXTRA has been fixed).

(See /host/bluemoon/usr2/idllib/contrib/meron/arc.pro)


ARREQ

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ARREQ
 VERSION:
	3.0
 PURPOSE:
	Compares arrays for equality.  The arrays qualify as equal if:
	    1) They are of the same general type (num., char., or struct.).
	    2) Number of dimensions is the same.
	    3) Size of each dimension is the same.
	    4) Respective elements are equal.
 CATEGORY:
	Mathematical Function (general).
 CALLING SEQUENCE:
	Result = ARREQ( ARR1, ARR2 [, keywords])
 INPUTS:
    ARR1, ARR2
	Arrays, type and number of dimensions arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /WARN
	Switch. If set, a warning message is issued for incompatible data types.
    /NOVALUE
	Switch.  If set, only number of elements and structure are compared.
 OUTPUTS:
	Returns 1 if the arrays are equal, 0 otherwise.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses the SIZE function and ISNUM from MIDL to obtain information about 
	the arrays.  Compares, in order, number of dimensions, size of each 
	dimension, data types, and (unless NOVALUE is set) individual elements.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 30-AUG-1998 by Mati Meron.  Scope broadened to pointer arrays.

(See /host/bluemoon/usr2/idllib/contrib/meron/arreq.pro)


ARRLOC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ARRLOC
 VERSION:
	3.0
 PURPOSE:
	Converts array indices from expanded (multi dimensional) form to 
	contracted (one dimensional) form and vice versa.
 CATEGORY:
	Array Function.
 CALLING SEQUENCE:
	Result = ARRLOC( INDS, SIZ [, keywords])
 INPUTS:
    INDS
	Numeric, converted to long integer on input.  Structure depends on 
	usage mode (EXPAND versus CONTRACT) and on the input parameter SIZ, as
	follows:
	    EXPAND mode  :  INDS can be a scalar or a vector (1-dim array).
	    CONTRACT mode:  If SIZ(0) = 0 then INDS arbitrary.  Else INDS can
	    be a scalar, vector or a 2-dim array, subject to the following 
	    restrictions:
		INDS is scalar:  SIZ(0) must be 1.
		INDS is vector:  SIZ(0) must equal the length of INDS.
		INDS is M*N array:  SIZ(0) must equal M (first array dimension).
    SIZ
	Vector in the form of the standard output of the system function SIZE.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /EXPAND
	Switch, specifies expansion mode.  This is the default.
    /CONTRACT
	Switch, specifies contraction mode.
 OUTPUTS:
	Depending on mode, as follows:
	EXPAND mode:  Returns an M*N array, where M is the number of dimensions
	    of the object charactarized by SIZ (i.e. SIZ(0)) and N is the 
	    number of elements in INDS.  For example, if S = [2,3,8,4,24] 
	    (corresponding to a 3*8 real array) then ARRLOC(5,S) will return
	    the vector [2,1] (the indices of the 5th element) while 
	    ARRLOC([2,5,22]) will return:	2	0
						2	1
						1	7
	CONTRACT mode:  Reverses the action of expand.  When fed an array in 
	    the form of the output of ARRLOC with EXPAND, returns a vector of
	    1-dimensional indices.  For example a call to ARRLOC using S and
	    the output array from the example above will return:	2
									5
									22
    In either mode, if any of the resulting indices is out of bounds for the
    array specified by SIZ, it is replaced by -1.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None other than those specified in the description of INDS, above.
 PROCEDURE:
	Straightforward.  Calls ONE_OF from MIDL.
 MODIFICATION HISTORY:
	Created 30-MARCH-1994 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/arrloc.pro)


ARRO.

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ARRO.
 VERSION:
	3.0
 PURPOSE:
	Draws an arrow in the current plot area, from the FROM to the TO 
	location.  DATA coordinates are used, unless one of the keywords 
	/DEVICE or /NORMAL is set.
 CATEGORY:
	General Graphics.
 CALLING SEQUENCE:
	ARRO, FROM = tail, TO = head [, keywords]
 INPUTS:
	None.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    FROM
	Two dimensional vector, start location, mandatory.
    TO
	Two dimensional vector, end location, mandatory.
    SIZE
	Scalar, specifies size of head [and tail], default is 1.
    /TAIL
	Switch.  Puts a tail on the arrow.
    /TWOSIDED
	Switch.  Draws a twosided arrow (heads on both ends).
    /DEVICE
	Standard IDL plotting interpretation.
    /NORMAL
	Ditto.
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
       The keywords passed through _EXTRA are transferred to the PLOTS 
	routine.  No keyword verification is performed by ARRO.
 PROCEDURE:
	Uses DEFAULT, ONE_OF, SHAPE_COCON, SHAPE_TRANS and WHERINSTRUCT 
	from MIDL.  All the coordinates are converted to DEVICE coordinates for
	shape generation and plotting purposes.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 15-DEC-1991 by Mati Meron.  Added keywords COLOR and TWOSIDED.
       Modified 15-DEC-1993 by Mati Meron.  Now ARROW takes advantage of the
       keyword inheritance property and accepts all IDL plotting keywords.
	Modified 5-OCT-1994 by Mati Meron.  Name changed to ARRO to avoid 
	conflicts with library routines.
	Modified 15-JUN-1995 by Mati Meron.  Utilizes WHERINSTRUCT for improved
	keyword inheritance.

(See /host/bluemoon/usr2/idllib/contrib/meron/arro.pro)


ASP_CORR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ASP_CORR
 VERSION:
	3.0
 PURPOSE:
	Corrects the aspect ratio of a 2-dimensional shape, in order to make up
	for for different scaling in the x and y dimensions.
 CATEGORY:
	Array Manipulation /General Graphics.
 CALLING SEQUENCE:
	Result = ASP_CORR( SHAPE, REFERENCE = reflin)
 INPUTS:
    SHAPE
	(2,*) numeric array, mandatory.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    REFERENCE
	Defines the scaling procedure, according to the provided character 
	value.  Accepts one of the following six values (only the first two
	characters matter):
	    'XLO' :  Scale x, keeping lowest x-value constant.
	    'XCEN':  Scale x, keeping center x-value constant.
	    'XHI' :  Scale x, keeping highest x-value constant.
	    'YLO' :  Scale y, keeping lowest y-value constant.
	    'YCEN':  Scale y, keeping center y-value constant.
	    'YHI' :  Scale y, keeping highest y-value constant.
 OUTPUTS:
	0 in case of failure (bad or missing shape or keyword value), otherwise
	the transformed shape is returned as a floating array (double if the
	input is of type double).
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Three dimensional shapes aren't currently accepted.
 PROCEDURE:
	Uses calls to CAST, DEFAULT, SHAPE_VER and STRMATCH from MIDL.  The 
	scaling is done using the sizes of the plotting area in device 
	coordinates, provided by the system variables !d.x_vsize and 
	!d.y_vsize.  Therefore the scaling is always proper for the current 
	output device.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/asp_corr.pro)


BESELK

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	BESELK
 VERSION:
	3.0
 PURPOSE:
	Calculates an approximation to Bessel K functions or their integrals.
 CATEGORY:
	Mathemetical Function (General).
 CALLING SEQUENCE:
	Result = BESELK (X, NI [, /INTEGRAL ])
 INPUTS:
    X
	Numerical, otherwise arbitrary.
    NI
	Scalar, the order of the function.
 OPTIONAL INPUT PARAMETERS:
    EPS
	Allowed relative error.  Default is machine precision.
 KEYWORD PARAMETERS:
    /INTEGRAL
	Switch, if set the integral of the K function from X to infinity is
	calculated.
 OUTPUTS:
	Returns the value(s) of K_ni(X) or, if INTEGRAL is set, of the integral
	of K_ni(t) from X to infinity.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses the Kostroun approximation, see NIM 172, 371-374 (1980).
	Calls DEFAULT, FPU_FIX, ISNUM and TOLER from MIDL.
 MODIFICATION HISTORY:
	Created 1-MARCH-1993 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/beselk.pro)


BOX

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	BOX
 VERSION:
	3.0
 PURPOSE:
	Creates an empty plot area, with boundaries defined by XLIMS and YLIMS.
 CATEGORY:
	General Graphics.
 CALLING SEQUENCE:
	BOX, XLIMS, YLIMS [, keywords]
 INPUTS:
    XLIMS, YLIMS
	2 dimensional vectors, format: [xmin,xmax] and [ymin,ymax] respectively.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /BORDER
	Switch.  Draws a border around the plot area.  Default - no border.
    /OVER
	Switch.  Creates the plot area over an existing plot.  Default - new 
	plot area.
    TRUASP
	Corrects the XLIMS or YLIMS values to yield a 1:1 aspect ratio.  
	Accepts six possible character values (only first 2 characters matter):
	    'XLO' :  Scale x, keeping lowest x-value constant.
	    'XCEN':  Scale x, keeping center x-value constant.
	    'XHI' :  Scale x, keeping highest x-value constant.
	    'YLO' :  Scale y, keeping lowest y-value constant.
	    'YCEN':  Scale y, keeping center y-value constant.
	    'YHI' :  Scale y, keeping highest y-value constant.
    /UPDATE_LIMS
	Switch.  If set, XLIMS and YLIMS are updated to the values used in 
	plotting.
    _EXTRA
	A formal keyword used to pass all plotting keywords.  Not to be used
	directly.  See comment in RESTRICTIONS.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	If UPDATE_LIMS is set, the values of XLIMS, YLIMS may change.
 RESTRICTIONS:
       The keywords passed through _EXTRA are transferred to the PLOTS 
	routine.  No keyword verification is performed by BOX.
 PROCEDURE:
	Uses calls to CAST, and STRMATCH from MIDL.  The scaling is done using 
	the sizes of the plotting area in device coordinates, provided by the 
	system variables !d.x_vsize and !d.y_vsize.  Therefore the scaling is 
	always proper for the current output device.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 15-DEC-1991 by Mati Meron.  Added keyword COLOR.
	Modified 15-DEC-1993 by Mati Meron.  Now BOX takes advantage of the 
	keyword inheritance property and accepts all IDL plotting keywords.
	Modified 1-MAY-1995 by Mati Meron.  Improved aspect ratio correction.

(See /host/bluemoon/usr2/idllib/contrib/meron/box.pro)


CAST

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CAST
 VERSION:
	3.0
 PURPOSE:
	Generalized type casting.  Converts variables whose type code is out 
	of the range [LOW,HIGH] into this range.
 CATEGORY:
	Programming (type conversion).
 CALLING SEQUENCE:
	Result = CAST( X, [LOW [,HIGH]])
 INPUTS:
    X
	Numerical, arbitrary, or a character representation of a number(s).
    LOW
	Number representing a type code, range (1:9).  If greater than 9, it is
	set to 9.  If less then 1, or not given, it is set to 1.
 OPTIONAL INPUT PARAMETERS:
    HIGH
	Type code, same as LOW.  Default value is 9.  If provided and less then
	LOW, it is set to LOW.
 KEYWORD PARAMETERS:
    /FIX
	Switch.  If set, the output is filtered through FPU_FIX, eliminating
	floating underflow errors.
 OUTPUTS:
	If the type of X is < LOW, CAST returns X converted to type LOW.
	If the type of X is > HIGH, CAST returns X converted to type HIGH.
	Otherwise CAST returns X.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	1)  An attempt to convert a string which is NOT a character 
	    representation of a number into a numeric type will yield error.
	2)  X cannot be a structure or pointer, but can be a structure element.
	3)  The value 8 for either LOW or HIGH is not allowed (since it 
	    corresponds to structure type).  Value of 10 and above is ignored.
 PROCEDURE:
	Identifies the type of X, and if out of the range given by [LOW,HIGH]
	calls the proper conversion routine using the system routine 
	CALL_FUNCTION.  Also uses FPU_FIX and ISNUM from MIDL.
 MODIFICATION HISTORY:
	Created 25-DEC-1991 by Mati Meron.
	Modified 15-JUN-1995 by Mati Meron to accept the new DOUBLECOMPLEX type.
	Modified 25-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/cast.pro)


CHEBYSHEV_POL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CHEBYSHEV_POL
 VERSION:
	3.0
 PURPOSE:
	Calculates Chebyshev polynomials Tn and associated functions.
 CATEGORY:
	Mathematical function.
 CALLING SEQUENCE:
	Result = CHEBYSHEV_POL( X, N, [ /ASSOCIATED])
 INPUTS:
    X
	Numeric, absolute values must be <= 1, otherwise arbitrary.
    N
       Nonnegative scalar, rounded to integer on input.  Defaults to 0.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /ASSOCIATED
	Switch.  When set, an associated function, SIN(N*ARCCOS(X)) is returned.
 OUTPUTS:
	Returns the values of the Chebyshev polynomial T(n,x), defined as
	COS(N*ARCCOS(X)) or (when ASSOCIATED is set), the values of the 
	associated Chebyshev function, SIN(N*ARCCOS(X)).
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None other then the restrictions on X, and N as mentioned above.
 PROCEDURE:
	Using the mathematical definition.  Calling DEFAULT and FPU_FIX from 
	MIDL.
 MODIFICATION HISTORY:
	Created 20-DEC-1994 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/chebyshev_pol.pro)


CIRCLE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CIRCLE
 VERSION:
	3.0
 PURPOSE:
 	Draws a circle, around CENTER, with radius given by RADIUS, X_RADIUS, 
	or Y_RADIUS.  The drawing is done in the currently defined plot area. 
	One and ONLY ONE of the three radius values MUST be provided.  RADIUS 
	and X_RADIUS are equivalent.  DATA coordinates are used unless one of 
	the keywords /DEVICE or /NORMAL is set.  The circle is drawn so as to
	appear visually as a circle, regardless of the coordinates used.
 CATEGORY:
	General Graphics.
 CALLING SEQUENCE:
	CIRCLE, CENTER = C, {RADIUS=R, X_RADIUS=XR, Y_RADIUS = YR} [, keywords]
 INPUTS:
	None.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    CENTER
	Two dimensional vector, circle center location, mandatory.
    RADIUS							|
	Scalar, value of radius (measured in the X direction).	| One
    X_RADIUS							| and only one
	Scalar, value of radius (measured in the X direction).	| must be
    Y_RADIUS							| provided.
	Scalar, value of radius (measured in the Y direction).	|
    /FILL
	Switch.  causes the circle to be filled with a solid pattern.
    /DEVICE
	Standard IDL plotting interpretation.
    /NORMAL
	Ditto.
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.  See comment in RESTRICTIONS.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	While nominally all graphics keywords can be passed (through _EXTRA),
	care should be exercised to use only the applicable ones (ELLIPSE and 
	PLOTS keywords usually, POLYFILL keywords when /FILL is used.
 PROCEDURE:
	Uses calls to COO_CONV and ONE_OF from MIDL.  Converts 	all parameters 
	to device coordinates and calls ELLIPSE (also from MIDL) to do the 
	actual plotting.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
       Modified 15-DEC-1993 by Mati Meron.  Now CIRCLE takes advantage of the
       keyword inheritance property and accepts all IDL plotting keywords.

(See /host/bluemoon/usr2/idllib/contrib/meron/circle.pro)


CONFRAC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    CONFRAC
 VERSION:
	3.0
 PURPOSE:
	Performs continued fraction evaluation.
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	Result = CONFRAC( A, B [,X [, keywords]])
 INPUTS:
    A
	A numeric scalar, vector or a 2-D array.  A(i,*) contains the i-th
	A coefficient(s) of the continued fraction.
    B
	Same as A for the B coefficient(s).  A and B must agree in their first
	dimension, i.e. if A is an (N,M) array (including the possibility of
	M = 1) then B must be an (N,M') array, with an arbitrary M'.
 OPTIONAL INPUT PARAMETERS:
    X
	Numeric, otherwise arbitrary.  When provided, X is used together with
	A and B to determine the continued fraction coefficients.
 KEYWORD PARAMETERS:
    AFUNCTION
	Name of a function to be used (with the CALL_FUNCTION routine) to 
	determine the A coefficients.  Optional.
    BFUNCTION
	Same as AFUNCTION for the B coefficients.  Optional.
    EPSILON
	Smallness parameter, determining the allowed evaluation error.  
	Optional.  Default values are machine dependent, established through
	TOLER which calls MACHAR().
    /RELATIVE
	Switch.  If set, EPS represent the allowed relative evaluation error.
    ERROR
	Optional output, see below.
    STATUS
	Optional output, see below.
 OUTPUTS:
	Returns the value(s) of the continued fraction.  The result is of the
	same format as X (a scalar if X is not given).  The type of the result 
	is the highest of the types of A, B, and X, but no lower than 4 (float).
 OPTIONAL OUTPUT PARAMETERS:
    ERROR
	The name of the variable to receive the estimated evaluation error.
	Given in the same format as X (scalar if X isn't provided).  If 
	RELATIVE is set the error returned is relative.  
    STATUS
	The name of the variable to receive evaluation status information.  
	Same format as ERROR.  Possible values are:
	    0 - evaluation didn't converge.
	    1 - OK.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None other then the restrictions on A, B, as mentioned above.
 PROCEDURE:
	CONFRAC evaluates continued fractions of the form
	
		res = a(0)/(b(0) + a(1)/(b(1) + a(2)/(b(2) + ......
	
	Using the recurrence relation from Numerical Recipies, Sec 5.2.  The
	designation of the coefficients a(i), b(i) depends on the data 
	provided, as follows:
	
	1)  If X isn't provided then a(i) = A(i) (or A(i,0) if A is a 2-dim 
	    array) and same is true for b(i) (using B)
	2)  If X is provided then a(i) = Sum_j(A(i,j)*X^j) and the same for b(i)
	    using B.  In other words the fraction coefficients are polynomials
	    in X, using columns of A, B, as polynomial coefficients.  Note that
	    if A and/or B are one dimensional arrays then only X^0 is used i.e.
	    we are back to case 1.
	3)  If AFUN and/or BFUN are provided then a(i) = afun(x,A(i,*),i) and
	    same for b(i) with BFUN and B.  The functions can be arbitrary but
	    they must accept at least three parameters.

	CONFRAC uses CAST, DEFAULT, FPU_FIX, POLEVAL, TOLER and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 20-DEC-1994 by Mati Meron.
	Modified 10-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/confrac.pro)


CONSTANTS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CONSTANTS
 VERSION:
	3.0
 PURPOSE:
	Creates or updates a system variable named !PCON.  !PCON is a structure
	the fields of which contain values of physical constants as follows:
	!PCON
	     USYS  - 	Unit System.  Either 'MKS' or CGS'.
	     C     -	Speed of light.
	     E     -	Electron charge.
	     H     -	Planck constant.
	     ME    -	Electron mass.
	     K     -	Boltzman constant.
	     NA    -	Avogadro constant.

	     ECONV -	Used internally for unit conversion.

	     HBAR  -	Planck constant divided by 2*pi.
	     ALPHA -	Fine structure constant.
	     AMU   -	Atomic mass unit.
	     SIGMA -	Stefan-Boltzman radiation constant.

	All the values are given in a double precision format.  Of course, the
	actual accuracy depends on how precisely they can be measured.
 CATEGORY:
	Utility.
 CALLING SEQUENCE:
	CONSTANTS [,/MKS or /CGS]
 INPUTS:
	None.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /MKS
	Switch.  Sets the units system to MKS.  This is also the default.
    /CGS
	Switch.  Sets the units system to CGS.  Default is MKS.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	M_CONS.  Contains a single parameter, EXISTS.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Can't use both MKS and CGS at the same time.
 PROCEDURE:
	Either creates or, if EXISTS is defined, updates the system variable
	!PCONS.  Uses ONE_OF from MIDL.
 MODIFICATION HISTORY:
	Created 30-MAR-1994 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/constants.pro)


COO_CONV

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	COO_CONV
 VERSION:
	3.0
 PURPOSE:
	Transforms values between the coordinate systems supported by IDL.
	Allowed coord systems are DATA, DEVICE (only for X, Y axes) and NORMAL.
	Functionally similar to the IDL function CONVERT_COORD, COO_CONV is
	maintained for historical reasons.
 CATEGORY:
	Plotting /General Graphics.
 CALLING SEQUENCE:
	Result = COO_CONV( R, AXIS = AX [, keywords])
 INPUTS:
    R
	numeric, otherwise arbitrary, assumed to be a coordinate(s) in the 
	direction specified by AXIS.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    AXIS
	Sets the transformation axis.  Accepts either a numeric value, one of
	(0, 1, 2) or a character value (only first character matters), one of 
	('X', 'Y', 'Z').  Mandatory.
    FROM
	Character value (only first 3 characters matter), specifies input
	coord. system.  One of ('DATA','DEVICE','NORMAL').  Defaults to 'DATA'.
    TO
	Same as FROM.  Specifies output coord. system.
 OUTPUTS:
	'' (0 length string) in case of failure (bad keyword value), otherwise
	returns the transformed value as floating (or double if the input is 
	of type double).
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses calls to CAST, DEFAULT, FPU_FIX, ISNUM, STREQ, STRMATCH and TYPE 
	from MIDL.  Converts coordinates using values provided by relevant 
	system variables.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 10-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/coo_conv.pro)


COSANGLE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	COSANGLE
 VERSION:
	3.0
 PURPOSE:
	Finds the Cosine of the angle between two vectors.
 CATEGORY:
	Geometry, General.
 CALLING SEQUENCE:
	Result = COSANGLE ( U, V)
 INPUTS:
    U, V
	Vectors, numeric, same length, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the Cosine of the angle between the two vectors.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Vectors must be non-zero.
 PROCEDURE:
	Uses the functions FPU_FIX, VINP and VNORM from MIDL.
 MODIFICATION HISTORY:
	Created 30-JUNE-1992 by Mati Meron.
	Added to MIDL 10-NOV-1997 by Mati Meron.
	Modified 10-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/cosangle.pro)


DEFAULT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DEFAULT
 VERSION:
	3.0
 PURPOSE:
	Provides an automatic default value for nondefined parameters.
 CATEGORY:
	Programming.
 CALLING SEQUENCE:
	Result = DEFAULT( X, Y [, keywords])
 INPUTS:
    X, Y
	Arbitrary, at least one needs to be defined.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /STRICT
	Switch.  If set, X is considered defined only if it is of the same type 
	as Y.
    /DTYPE
	Switch.  If set, the result will be typecast into the type of Y.  
	Explicit settings for LOW and/or HIGH (see below) override DTYPE.
    LOW
	Numeric value between 1 to 9 (8 is excluded). If given, the result is 
	of type >= LOW.
    HIGH
	Numeric value between 1 to 9 (8 is excluded). If given, the result is 
	of type <= HIGH.
 OUTPUTS:
	X if it is defined, otherwise Y.  
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	All type casting is bypassed if the result is of type 8 (STRUCTURE) or
	higher than 9.
 PROCEDURE:
	Uses the functions CAST, ISNUM and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 15-NOV-1993 by Mati Meron.  The keyword TYPE has been replaced
	by STRICT.  Added keywords DTYPE, LOW and HIGH.

(See /host/bluemoon/usr2/idllib/contrib/meron/default.pro)


DEGLITCH

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DEGLITCH
 VERSION:
	3.0
 PURPOSE:
	Replaces exceptional array elements by the average of their neighbors.
 CATEGORY:
	Array Function.
 CALLING SEQUENCE:
	Result = DEGLITCH( ARR, THRESH [, keywords])
 INPUTS:
    ARR
	Array, numeric, otherwise arbitrary.
    THRESH
	Threshold value for element replacement.  Must be > 1.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /DOWN
	Switch.  If set the correction is downward, i.e. elements which are too
	big (in absolute value) are replaced.  This is the default.
    /UP
	Switch.  If set the correction is upward, i.e. elements which are too
	small (in absolute value) are replaced.
    COUNT
	Optional output, see below.
 OUTPUTS:
	Returns the corrected array, i.e. an array of the same format as ARR, 
	in which all the exceptional element have been replaced by the average 
	of their neighbors.
 OPTIONAL OUTPUT PARAMETERS:
    COUNT
	The name of the variable to receive the number of exceptional elements.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Compares the absolute values of the original array and the one obtained
	by neighborhood averaging.  Locates exceptions and replaces them by
	neighborhood average.  Uses FPU_FIX, ONE_OF and NEIGHBORS from MIDL.
 MODIFICATION HISTORY:
	Created 30-MARCH-1994 by Mati Meron.
	Modified 10-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/deglitch.pro)


DIAGOARR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DIAGOARR
 VERSION
	3.0
 PURPOSE:
	Creates a diagonal square matrix with the elements of a given vector on
	the diagonal.
 CATEGORY:
	Array Manipulation.
 CALLING SEQUENCE:
	Result = DIAGOARR(VEC)
 INPUTS:
    VEC
	Vector.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Return a square N*N (N is the vector's dimension) matrix, with the 
	elements of VEC on the diagonal and zeroes elsewhere.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Calls TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 20-MAY-1993 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/diagoarr.pro)


DIAGOVEC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DIAGOVEC
 VERSION:
	3.0
 PURPOSE:
	Extracts the diagonal of a square matrix as a vector.
 CATEGORY:
	Array Manipulation.
 CALLING SEQUENCE:
	Result = DIAGOVEC(ARR)
 INPUTS:
    ARR
	Array, 2-dimensional, square.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	If ARR is a square matrix, returns the diagonal as a vector, else
	generates an error message.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Created 20-DEC-1991 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/diagovec.pro)


ELLIPSE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ELLIPSE
 VERSION:
	3.0
 PURPOSE:
	Draws an ellipse, around CENTER, with radii given by RADII, optionally 
	rotating it by angle ROT.  The drawing is done in the currently 
	defined plot area.  DATA coordinate system is assumed unless specified 
	otherwise by one of the keywords /DEVICE or /NORMAL.
 CATEGORY:
	General Graphics.
 CALLING SEQUENCE:
	ELLIPSE, CENTER = CENT, RADII = RD, [, optional keywords]
 INPUTS:
	None.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    CENTER
	2 dimensional vector, ellipse center location, format [x,y], mandatory.
    RADII
	2 dimensional vector, contains the x and y radii (in order), mandatory.
    ARC
	Optional.  Allows to draw an elliptical arc.  Accepts a vector of 
	length 2 containing the start and end angles for the arc.  If only one
	value is provided, the arc is drown from angle 0 to this value if it is
	positive, or from this value to 0 if it is negative.  The angles are
	assumed to be in radians unless DEGREES is set.
    /DEGREES
	Switch.  Specifies that the rotation (and arc) angles are given in 
	degrees.
    ROTATE
	Optional.  Angle of rotation in the mathematical positive direction.  
	Assumed in radians, unless DEGREES is set.
    ROTATION_CENTER
	Optional.  Accepts a two element vector specifying the center of
	rotation.  Ignored if ROTATE is not given.  Defaults to center of shape.
    /FILL
	Switch.  Causes the ellipse to be filled with a solid pattern.
    /DEVICE
	Standard IDL plotting interpretation.
    /NORMAL
	Ditto.
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.  See comment in RESTRICTIONS.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	If the DATA coordinate system is used and the plot area is defined with
	nonlinear (logarithmic) axes, the shape won't look like an ellipse.
	ELLIPSE calls either PLOTS or (when /FILL is used) POLYFILL.  Since 
	some graphics keywords work only with PLOTS, or only with POLYFILL, 
	some care must be exercised.
 PROCEDURE:
	Uses calls to DEFAULT, ONE_OF, SHAPE_COCON and SHAPE_TRANS from MIDL.
	Generates a (2,N) array containing a sufficient number of ellipse 
	points to yield a smooth curve.  N is variable, depending both on the 
	ellipse size and on the pixel size of the current output device.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 15-DEC-1991 by Mati Meron.  Added size and device dependence
	of the number of plot points.
	Modified 15-OCT-1992 by Mati Meron.  Added rotation.
       Modified 15-DEC-1993 by Mati Meron.  Now ELLIPSE takes advantage of the
       keyword inheritance property and accepts all IDL plotting keywords.
	Modified 1-MAY-1995 by Mati Meron.  Added capability to draw an
	elliptical arc.

(See /host/bluemoon/usr2/idllib/contrib/meron/ellipse.pro)


ERRBARS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ERRBARS
 VEERSION:
	3.0
 PURPOSE:
	Overplots error bars over an existing plot.  More general than the 
	library routines ERRPLOT and PLOTERR, since it allows to independently 
	vary both X and Y errors, and allows for nonsymmetric error bars.
 CATEGORY:
	Plotting.
 CALLING SEQUENCE:
	ERRBARS, [X,] Y [, XERR = XER, YERR = YER]
 INPUTS:
    X, Y
	Vectors containing the data points' coordinates.  If only one is given
	it is taken to be Y, same as in the PLOT command.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    XERR
	Either a vector or a (2,N) array where N is the number of the data 
	points.  Contains the X-errors.  If given as a 2 dimensional array, the
	entries XERR(0,i) and XERR(1,i) are taken as the errors of X(i) in the
	negative and positive directions, respectively.  If given as a vector,
	the entry XERR(i) serves as both the negative and positive error of 
	X(i) and therefore symmetric error bars are drawn.  If not provided,
	the default is no X-errors.
    YERR
	Same as above, for the Y-errors.
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.  See comment in RESTRICTIONS.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
       The keywords passed through _EXTRA are transferred to the PLOTS 
	routine.  No keyword verification is performed by ERRBARS.
 PROCEDURE:
	Straightforward.  Uses DEFAULT from MIDL.
 MODIFICATION HISTORY:
	Created 10-DEC-1991 by Mati Meron.
       Modified 15-DEC-1993 by Mati Meron.  Now ERRBARS takes advantage of the
       keyword inheritance property and accepts most of IDL plotting keywords.

(See /host/bluemoon/usr2/idllib/contrib/meron/errbars.pro)


EXTEND_ARRAY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	EXTEND_ARRAY
 VERSION:
	3.0
 PURPOSE:
	Extends an array to a larger size, filling the blanks according to
	keyword specifications.
 CATEGORY:
	Array function.
 CALLING SEQUENCE:
	Result = EXTEND_ARRAY( ARR, [, OFF] [,keywords]])
 INPUTS:
    ARR
	Array, arbitrary.
    OFF
	Vector containing the offset of ARR into the result array.  Defaults 
	to zero(s).  If the number of entries is smaller then the dimension
	(either of ARR or of the result) missing entries are replaced with 0, 
	from left.  Thus if the result has dimensions of (4,5,6) but offset 
	is given as [2,2], an offset of [0,2,2] is used.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    NEWSIZE
	A vector, containing the parameters of the result array, in the format
	of the output of the IDL SIZE function.  If not given, the size used is
	the minimal size capable of containing the original array with the 
	specified offset.
    VALUE
	A scalar value used to fill the blanks in the result array.  Defaults 
	to 0.  Warning:  VALUE and EDGE_EXTEND cannot be specified at the same 
	time
    /EDGE_EXTEND
	Switch.  If set, the blanks in the result array are filled with the
	adjoining edge values of ARR.  Warning:  EDGE_EXTEND and VALUE cannot 
	be specified at the same time
 OUTPUTS:
	Returns an array of size specified either by NEWSIZE or combination of
	the original size and offset.  The original arry is imbedded in the 
	result, and the blanks are filled according to the keywords VALUE or
	EDGE_EXTEND.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	The new size, as provided by NEWSIZE, must be large enough to contain
	the original array with the offset.
 PROCEDURE:
	Straightforward.  Calls DEFAULT and ONE_OF from MIDL.
 MODIFICATION HISTORY:
	Created 20-JAN-1997 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/extend_array.pro)


EXTREMA

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	EXTREMA
 VERSION:
	3.0
 PURPOSE:
	Finding all local minima and maxima in a vector.
 CATEGORY:
	Mathematical Function (array).
 CALLING SEQUENCE:
	Result = EXTREMA( X [, keywords])
 INPUTS:
    X
	Numerical vector, at least three elements.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /MIN_ONLY
	Switch.  If set, EXTREMA finds only local minima.
    /MAX_ONLY
	Switch.  If set, EXTREMA finds only local maxima.
    THRESHOLD
	A nonnegative value.  If provided, entries which differ by less then
	THRESHOLD are considered equal.  Default value is 0.
    /CEILING
	Switch.  Determines how results for extended extrema (few consecutive 
	elements with the same value) are returned.  See explanation in OUTPUTS.
    SIGNATURE
	Optional output, see below.
    NUMBER
	Optional output, see below.
 OUTPUTS:
	Returns the indices of the elements corresponding to local maxima 
	and/or minima.  If no extrema are found returns -1.  In case of 
	extended extrema returns midpoint index.  For example, if 
	X = [3,7,7,7,4,2,2,5] then EXTREMA(X) = [2,5].  Note that for the 
	second extremum the result was rounded downwards since (5 + 6)/2 = 5 in
	integer division.  This can be changed using the keyword CEILING which 
	forces upward rounding, i.e. EXTREMA(X, /CEILING) = [2,6] for X above.
 OPTIONAL OUTPUT PARAMETERS:
    SIGNATURE
	The name of the variable to receive the signature of the extrema, i.e.
	+1 for each maximum and -1 for each minimum.
    NUMBER
	The name of the variable to receive the number of extrema found.  Note
	that if MIN_ONLY or MAX_ONLY is set, only the minima or maxima, 
	respectively, are counted.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Calls ARREQ, DEFAULT and ONE_OF from MIDL.
 MODIFICATION HISTORY:
	Created 15-FEB-1995 by Mati Meron.
	Modified 15-APR-1995 by Mati Meron.  Added keyword THRESHOLD.

(See /host/bluemoon/usr2/idllib/contrib/meron/extrema.pro)


FPU_FIX

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	FPU_FIX
 VERSION:
	3.0
 PURPOSE:
	Clears Floating Point Underflow errors, setting the offending values to 
	zero.
 CATEGORY:
	Programming.
 CALLING SEQUENCE:
	Result = FPU_FIX( X)
 INPUTS:
    X
	Arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /NO_ABS
	Switch.  If set, uses value instead of absolute value for comparison 
	with machine minimum.  For internal use only.
 OUTPUTS:
	If the input is of any numeric type, returns the input, with the 
	possible substitution of 0 for all occurences of Floating Point 
	Underflow.  A non-numeric input is returned as is.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Uses the system routines CHECK_MATH and MACHAR.  Also 
	calls ISNUM and M_ABS from MIDL.
 MODIFICATION HISTORY:
	Created 30-AUG-1998 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/fpu_fix.pro)


FRESNEL_INT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	FRESNEL_INT
 VERSION:
	3.0
 PURPOSE:
	Calculates the Fresnel Integrals, C(x) or S(X).
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	Result = FRESNEL_INT (X [, keywords])
 INPUTS:
    X
	Numeric, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /SINE
	Switch.  If set, the Fresnel sine integral, S(X), is returned.
    /COMPLEMENTARY
	Switch.  If set, 1/2 - C(X) (or S(X)) is returned.
 OUTPUTS:
	Returns the Fresnel Cosine integral C(X) or, if /COMPLEMENTARY is set,
	the sine integral S(X).  If /COMPLEMENTARY is set, the output is 
	1/2 (the value at infinity) - C(X) (or S(X)).
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	While the function is defined also for complex values of X, large 
	complex values may cause calculational instabilities.  A warning is 
	issued in this case.
 PROCEDURE:
	Uses the function M_ERRORF from MIDL, as well as CAST and TYPE, also
	from MIDL.
 MODIFICATION HISTORY:
	Created 20-MAR-1996 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/fresnel_int.pro)


HEAD

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	HEAD
 VERSION:
	3.0	
 PURPOSE:
	Displays the beginning ("head") or, optionally, a selected part of an 
	1-2D array.
 CATEGORY:
	Input/Output.
 CALLING SEQUENCE:
	HEAD, A [,B ...H] [,keywords]
 INPUTS:
    A [,B ...H]
	One or more arrays, of arbitrary type.  If more than one array is 
	provided, all the arrays have to be 1D.  A single array can have 1 or 
	2 dimensions, but no more than 2.
 OPTIONAL INPUT PARAMETERS:
	All but the first input are optional.
 KEYWORD PARAMETERS:
    NR
	The number of rows to be displayed.  Default value is 10 (except for 
	the case of a single 1D array in wrapping mode (see keyword NO_WRAP, 
	below), when it is 12).  If explicit values for the starting and ending
	row numbers are provided through the keyword ROW (see below), NR is 
	ignored.
    NC
	Same as NR, for columns.  Default value is 6, maximal value is 8.
	In the case of a single 1D array in wrapping mode, NC is 
	interchangeable with NR and, if both are provided, NC is ignored.
    ROW
	Specifies the first (and possibly last) row of the displayed array 
	part.  For an array with N rows, the possibilities are as follows:

	    1)	No value provided: display area is from row #0 through row
		#(NR - 1) or last row, whichever comes first.
	    2)	Scalar value r0:  display area is from row #r0 through row
		#(r0 + NR - 1) or last row, whichever comes first.
	    3)  Single vector value r0 (for example, ROW = [4]):  this is 
		interpreted as a vector input, ROW = [r0,r0] (see case 4 below)
		and a single row (#r0) is output.
	    4)	Two element vector of the form ROW = [r0,r1]:  In this case
		display area is from row #r0 through row #r1.

	In the case of a single 1D array in the default wrapping mode (see
	keyword NO_WRAP, below), ROW is interchangeble with COLUMN and 
	specifies the first (and, possibly, last) element to be displayed).
    COLUMN
	Same as ROW, for columns of the display area.  For a 2D array the 
	default number of displayed columns is the smaller of 6 and the actual 
	number of columns in the data.  For 1D arrays COLUMN is ignored, 
	except for the case of a single 1D array in wrapping mode.  In this 
	case COLUMN is interchangeable with ROW (see above) and ignored if ROW
	is provided.
	Maximal possible number of displayed columns is 8.
    /TRANSPOSE
	Switch.  If set and the input array is 2D, the transpose of the array 
	is used.  Thus HEAD, A, /TRANSPOSE is equivalent to HEAD, TRANSPOSE(A).
	Ignored for multiple 1D inputs.
    /SHOW_INDEX
	Switch.  If set, the indices of the rows and columns shown are 
	displayed, on the right (for rows) and top (for columns).
    /NO_WRAP
	Switch.  Turns off wrapping mode which is on, by default for single 1D
	arrays.  In the wrapping mode the array is displayed over as many lines
	as needed, same as when being displayed using the PRINT statement.  In
	a non-wrapping mode only a portion of a 1D array that fits on a single 
	line may be displayed.  If the input consists of a 2D array or multiple 
	1D arrays, the wrapping mode is off.
    FORMAT
	Character array, containing format specifications for the columns.
	If not provided, default TABULATE formats are used.  If only a single 
	entry provided, it'll be used for all columns.  For more details see
	TABULATE.
	If multiple entries are provided in the wrapping mode, only the first
	one is used.
    _EXTRA
	A formal keyword used to pass keywords to TABULATE.  Not to be used
	directly.  All TABULATE keywords are available.
 OUTPUTS:
	None, other then the printed output.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	As mentioned above:
	    1)	Arrays with more then 2 dimensions not accepted.
	    2)	For 2D, only a single array is allowed.
	    3)	For 1D, up to 8 arrays allowed.  They can be of different 
		types but must have same length.
	    4)  Wrapping is only possible with a single 1D array.
 PROCEDURE:
	HEAD serves as a front end to TABULATE.  It selects a part of the 
	input, based on the row and column settings, and passes it to TABULATE 
	which displays it.  In addition to TABULATE, HEAD calls DEFAULT, 
	HOW_MANY, STRPARSE and TYPE from MIDL.
	In the wrap mode, HEAD bypasses TABULATE and uses PRINT, directly.
 MODIFICATION HISTORY:
	Created 1-NOV-1997 by Mati Meron.
	Modified 5-OCT-1998 by Mati Meron.  Added wrap mode for 1D arrays.

(See /host/bluemoon/usr2/idllib/contrib/meron/head.pro)


HOW_MANY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	HOW_MANY
 VERSION:
	3.0
 PURPOSE:
	Called with up to 8 keyword parameters, HOW_MANY checks how many and 
	which of the corresponding variables are defined and (optionally) 
	within given type limits.
 CATEGORY:
	Programming.
 CALLING SEQUENCE:
	Result = HOW_MANY ([FIRST ... ] [LOW =LO] [HIGH = HI] [/NOZERO] $
		[WHICH_ONES = BCOD])
 INPUTS:
	None.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    FIRST	|
    SECOND	|
    THIRD	|
    FOURTH	|	Each of these keywords accept an arbitrary input,
    FIFTH	|	including no input or undefined input.
    SIXTH	|
    SEVENTH	|
    EIGHTH	|

    /NOZERO
	Switch.  If set, specifies that only non zero (or non null string)
	values are to be recognized as existing.
    LOW
	Optional numeric input, specifying the lowest limit of type code that 
	is recognized.  For example, if LOW is set to 3, variables of type BYTE
	and INTEGER will not be recognized as defined.  Default value is 1, 
	i.e. everything is recognized.
    HIGH
	Same as LOW for the upper limit.  Default value is 12, i.e. everything 
	is recognized.
    WHICH_ONES
	Optional output, see below.
 OUTPUTS:
	Returns the number of defined keyword variables, regardless of their
	types and values.
 OPTIONAL OUTPUT PARAMETERS:
    WHICH_ONES
	The name of a variable to receive a a binary representation of the 
	defined variables, as a long integer.  For example, if the variables 
	corresponding to FIRST, FIFTH and SIXTH are defined, the result is 
	2^0 + 2^4 + 2^5 = 49.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Currently HOW_MANY is restricted to a maximum of 8 variables.  If 
	needed, the number can be increased.
 PROCEDURE:
	Straightforward.  Calls DEFAULT and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 15-AUG-1994 by Mati Meron, as a more general version of ONE_OF.

(See /host/bluemoon/usr2/idllib/contrib/meron/how_many.pro)


INTEG

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	INTEG
 VERSION:
	3.0
 PURPOSE:
	Integrates a function provided as an array of points.
 CATEGORY:
	Mathematical Function (array).
 CALLING SEQUENCE:
	Result = INTEG([X,] Y [, keywords])
 INPUTS:
    Y
	A vector containing the Y coordinates of the data.
 OPTIONAL INPUT PARAMETERS:
    X
	A vector containing the X coordinates of the data.  If not provided, 
	it is assumed that the X coordinates are equally spaced, with a default
	default spacing of 1. (unless changed by the DELTA keyword).
 KEYWORD PARAMETERS:
    DELTA
	Sets the spacing of the X coordinates of the data.  If the X coord.
	are explicitly provided (see X input above) DELTA is ignored.
    /VALUE_ONLY
	Switch.  Normally INTEG returns the integral function of Y, as a vector
	(see OUTPUTS below).  If VALUE_ONLY is set, only the full value of the
	integral is returned as scalar.  This makes the execution faster.
 OUTPUTS:
	Normally returns the integral function of Y, i.e. a vector whose i-th 
	entry is the integral of Y from X(0) to X(i) (and therefore the last 
	entry is the full integral of Y.  If the optional keyword VALUE_ONLY is
	set, only the full integral is returned, as a scalar.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	The Y vector (and the X vector, if provided) must be of length >= 3.
 PROCEDURE:
	Simpson integration, where the mid-interval points are obtained from 
	cubic interpolation using Neville's algorithm.
	Uses DEFAULT, FPU_FIX and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 20-FEB-1992 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/integ.pro)


ISNUM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ISNUM
 VERSION:
	3.0
 PURPOSE:
	Checks whether the input is a number.
 CATEGORY:
	Programming.
 CALLING SEQUENCE:
	Result = ISNUM(X)
 INPUTS:
    X
	Arbitrary, doesn't even have to exist.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /DOUBLE
	Switch.  If set the result is 1 only if X is DOUBLE or DCOMPLEX.
    /COMPLEX
	Switch.  If set the result is 1 only if X is COMPLEX or DCOMPLEX.
    TYPE
	Optional output.  See below.
 OUTPUTS:
	Returns 1 if X is number, 0 otherwise.  Output type is byte.
 OPTIONAL OUTPUT PARAMETERS:
    TYPE
	The name of the variable to receive the numeric code of the type of X.
	Included for convenience to save an additional call to TYPE.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Using TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 15-JUN-1995 by Mati Meron.
	Modified 5-MAY-1996 by Mati Meron.  Added keywords DOUBLE, COMPLEX and
	TYPE.

(See /host/bluemoon/usr2/idllib/contrib/meron/isnum.pro)


LABELS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	LABELS
 VERSION:
	3.0
 PURPOSE:
	Multiple XYOUTS interface.
 CATEGORY:
	General Graphics.
 CALLING SEQUENCE:
	LABELS, X, Y, LABS [ ,ALIGN = ALN] [, optional keywords]
 INPUTS:
    X
	The X coordinates of the labels.  Can be given either as a scalar (in
	which case all the labels will have the same x coordinate) or as a
	vector of the same length as the LABS vector.
    Y
	Same as above for the Y coordinates.
    LABS
	A character vector containing the labels to be drawn.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    ALIGN
	The allignment parameter for LABS (see ALIGN graphics keyword in the
	IDL manual.  Can be given as a vector, thus providing individual
	allignment parameter to each string in LABS.
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.  See comment in RESTRICTIONS.
 OUTPUTS:
       None.
 OPTIONAL OUTPUT PARAMETERS:
       None.
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
	If any of X, Y or ALIGN is given as a scalar variable, it is converted 
	to a vector of the same length as LABS.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straigtforward.  Calls DEFAULT from MIDL.
 MODIFICATION HISTORY:
	Created 10-DEC-1991 by Mati Meron.
	Modified 15-DEC-1993.  Incorporated keyword inheritance, allowing for 
	using all the XYOUTS keywords.

(See /host/bluemoon/usr2/idllib/contrib/meron/labels.pro)


LAPLACIAN

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	LAPLACIAN
 VERSION:
	3.0
 PURPOSE:
	Calculates the Laplacian of a function represented as an array of 
	values.  Works for 1-7 dimensions.
 CATEGORY:
	Array Manipulation.
 CALLING SEQUENCE:
	Result = LAPLACIAN( ARR [, DELTA])
 INPUTS:
    ARR
	Array, numeric, number of dimensions can be 1 through 7
 OPTIONAL INPUT PARAMETERS:
    DELTA
	Size of step used to calculate the numeric derivatives.  The approx.
	second partial derivative in the i-th direction is calculated as
	 (ARR(...,I + DELTA,...) + ARR(...,I - DELTA,...) - 2*ARR(...,I,...)) $
	 /DELTA^2
	The default value of DELTA is 1l.  If provided, it is rounded to a long
	integer on input.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the absolute value of the gradient as an array of the same size
	as ARR.  If ARR is not an array, returns 0.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Due to current limitations of the MAKE_ARRAY system routine, 8 
	dimensions are not allowed.
 PROCEDURE:
	Creates an 7-dimensional array, with dummy leading dimensions, 
	containing the original array.  Generates the differences using the
	SHIFT system routine and strips the dummy dimensions at the end.
	Uses the functions DEFAULT and FPU_FIX from MIDL.
 MODIFICATION HISTORY:
	Created 15-NOV-1991 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/laplacian.pro)


LEGENDRE_POL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	LEGENDRE_POL
 VERSION:
	3.0
 PURPOSE:
	Calculates Legendre polynomials Pl and associated polynomials Plm.
 CATEGORY:
	Mathematical function.
 CALLING SEQUENCE:
	Result = LEGENDRE_POL( X, L [, M])
 INPUTS:
    X
	Numeric, absolute values must be <= 1, otherwise arbitrary.
    L
	Nonnegative scalar, rounded to integer on input.  Defaults to 0
 OPTIONAL INPUT PARAMETERS:
    M
	Nonnegative scalar, rounded to integer on input.  Defaults to 0.  Must
	be <= L.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the values of the Legendre polynomial P(l,x) or (when M is not
	zero) of the associated Legendre polynomial P(l,m,x).
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None other then the restrictions on X, L and M as mentioned above.
 PROCEDURE:
	Using the recurrence relation from Numerical Recipies, Sec. 6.6.
	Calling CAST, DEFAULT, and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 20-DEC-1994 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/legendre_pol.pro)


LINCROSS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	LINCROSS
 VERSION:
	3.0
 PURPOSE:
	Finds the crossing point of two line segments or lines, in 2D.
 CATEGORY:
	Geometry.
 CALLING SEQUENCE:
	Result = LINCROSS( FIR, SEC [,LINES = LIN] [,CROSS = CRP])
 INPUTS:
    FIR
	First line/line_segment provided as a (2,2) array.  Two possible forms:
	    1)	Segment:  Endpoints given by 2D vectors FIR(*,0) and FIR(*,1).
	    2)  Line: Point on the line given by FIR(*,0), line direction by 
		FIR(*,1).
	Whether FIR is interpreted as a line or a segment depends on the 
	value provided to LINES.  Default interpretation is segment.
    SEC
	Same as FIR, for the second line/line _segment.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    LINES
	Numeric code specifying whether FIR and SEC should be considered lines
	or segments.  Possible values are

	LINES		FIR		SEC

	0 or 
	undefined	segment		segment
	1		line		segment
	2		segment		line
	3		line		line
    CROSS
	Optional output, see below.
 OUTPUTS:
	Returns 1b if a crossing exists, 0b otherwise.  For lines a crossing
	always exists, unless they happen to be parallel.
 OPTIONAL OUTPUT PARAMETERS:
    CROSS
	The name of a variable to receive the coordinates of the crossing point
	as a 2D vector (X_cross,Y_cross).  If no crossing exists, both values 
	are set to the square root of the maximal floating value (machine 
	dependent).
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Calls DEFAULT, FPU_FIX and SOLVE_LINSYS from MIDL.
 MODIFICATION HISTORY:
	Created 10-NOV-1997 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/lincross.pro)


MAKE_GRID

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	MAKE_GRID
 VERSION:
	3.0
 PURPOSE:
	Generates a 1-6 dimensional grid of points within a specified range.
 CATEGORY:
	Array manipulation.
 CALLING SEQUENCE:
	Result = MAKE_GRID( SPAN, [ NPOINTS] [keywords])
 INPUTS:
    SPAN
	A (2,N) numeric array, where N <= 6 is the number of grid dimensions.
	The pair of entries in SPAN(*,i) represents the coordinate minimum and
	maximum in the i-th dimension of the grid.
 OPTIONAL INPUT PARAMETERS:
    NPOINTS
	A numeric vector containing the number of points along each dimension.
	If not provided, the same number of points will be assigned to each 
	dimension.  This default number depends on the number of dimensions, as
	follows:
	    dimensions	|    points per dimension
		1 		2^20
		2		2^10
		3		2^6
		4		2^4
		5		2^3
		6		2^3
	If NPOINTS has less entries then the number of dimensions, the missing
	entries will be assigned the value of the last existing one.  If some
	of the entries (but not the first) are 0 or 1, they'll be replaced by 
	the value of the preceding non-zero entry.

	The meaning of NPOINTS changes if the optional keyword STEPSIZE is set.
	In this case the entries in NPOINTS represent the step sizes along each
	dimension (if not provided, stepsizes are set so as to yield the 
	default number of points per dimension as mentioned above).  If some of
	the step sizes are bigger then the corresponding spans, they will be
	adjusted to the span size.  Again, If some of the entries (but not the 
	first) are 0 or missing, they'll be replaced by the value of the 
	preceding non-zero entry.

	Comment:  A NPOINTS entry of 1 is allowed if /STEPSIZE isn't set and
	the corresponding minimum and maximum in SPAN are the same.
 KEYWORD PARAMETERS:
    /STEPSIZE
	Switch.  Specifies that the entries in NPOINTS are to be treated as
	step sizes.
    DIMVEC
	Optional output, see below.
    FUNARR
	Optional output, see below.
 OUTPUTS:
	Returns an array with the dimensions (NDIM,NPOINTS(0),...) where NDIM 
	is the number of dimensions of the grid, such that Result(*,i0,i1,...)
	is a vector containing the cartesian coordinates of the point at
	location (i0,i1,...) within the grid.  The output type is FLOAT (or
	DOUBLE if SPAN is of type DOUBLE).
 OPTIONAL OUTPUT PARAMETERS:
    DIMVEC
	The name of the variable to receive the vector (NPOINTS(0), 
	NPOINTS(1),...), containing the number of points along each dimension 
	in the result.
    FUNARR
	The name of the variable to receive a blank array of dimensions
	(NPOINTS(0),NPOINTS(1),...).  This array can be used to receive the 
	values of a function evaluated over the grid.  The output type is FLOAT
	(or DOUBLE if SPAN is of type DOUBLE).
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	The number of dimensions must not exceed 6.
 PROCEDURE:
	Straightforward.  Uses CAST, DEFAULT, FPU_FIX and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 15-JAN-1992 by Mati Meron.
	Modified 15-AUG-1994 by Mati Meron.  Added the STEPSIZE option.  Also,
	from now on, if SPAN is of type DOUBLE, the outputs are of type DOUBLE.
	Modified 20-JAN-1997 by Mati Meron to allow for a single point along
	dimension with a zero span.
	Modified 15-SEP-1998 by Mati Meron.  Added keyword DIMVEC to return the
	number of points used along each dimension (especially useful with the
	/STEP option.  Also added underflow filtering.

(See /host/bluemoon/usr2/idllib/contrib/meron/make_grid.pro)


M_ABS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_ABS
 VERSION:
	3.0
 PURPOSE:
	Calculates absolute values.  A temporary fix needed since the IDL ABS 
	function fails with very large or very small complex numbers.
 CATEGORY:
	Mathematical, general.
 CALLING SEQUENCE:
	Result = M_ABS (X)
 INPUTS:
    X
	Numerical, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the absolute value of the input.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Calling ISNUM and FPU_FIX from MIDL.
 MODIFICATION HISTORY:
	Created 15-MAR-1996 by Mati Meron.
	Modified 30-AUG-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_abs.pro)


M_CONVOL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_CONVOL
 VERSION:
	3.0
 PURPOSE:
	Calculates the convolution of two functions represented by arrays.
 CATEGORY:
	Mathematical, array function.
 CALLING SEQUENCE:
	Result = M_CONVOL (FAR, GAR [, keywords])
 INPUTS:
    FAR
	Array, numeric, otherwise arbitrary.
    GAR
	Ditto.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /NOCENTER
	Switch.  Prevents centering one array over the other (corresponds to
	the CENTER = 0 setting in IDL CONVOL.  The default is CENTERED.
    /REVERSE
	Switch.  Reverses the direction, i.e instead of f(x-x')g(x') the
	integrand becomes f(x+x')g(x').
    /CLIP
	Switch.  If set, the edges of the result (which cannot be fully 
	convolved) are set to zero, same as the default behavior of IDL CONVOL.
	The default behaviour of M_CONVOL corresponds to the IDL CONVOL 
	EDGE_WRAP SETTING.
    EDGE_VAL
	Accepts a value to be used for all the "beyond the edge " elements.
	if EDGE_VAL is provided, /CLIP is ignored.  EDGE_VAL and EDGE_TRUNCATE
	are mutually exclusive
    /EDGE_TRUNCATE
	Switch.  If set, the "beyond the edge" elements are obtained by a
	propagation of the edge elements of FAR.  EDGE_TRUNCATE and EDGE_VAL
	are mutually exclusive
 OUTPUTS:
	Returns the result of the convolution with dimensions corresponding to 
	the bigger of the two arrays.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses FFT.  Faster then the IDL CONVOL, and differs from it in few 
	significant aspects, as follows:

	1) The two arrays are treated symmetrically, i.e. the result stays the 
	same if they are exchanged (with the exception that when /REVERSE is
	set, it is always the second array that's reversed.
	2) The problem with IDL CONVOL, where the centered convolution is 
	calculated in a reversed direction (versus standard mathematical 
	practice) has been corrected.
	3) The arrays don't have to be of the same dimensionality.  If they're 
	not they are imbedded in an array big enough to contained both and 
	padded with zeroes (default), a constant value (if EDGE_VAL is used)
	or the edge elements of FAR (if EDGE_TRUNCATE is used).

	Calls CAST, EXTEND_ARRAY, FPU_FIX and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 15-NOV-1996 by Mati Meron.
	Modified 20-JAN-1997 by Mati Meron.  Streamlined (through the use of
	EXTEND_ARRAY and added keyword EDGE_TRUNCATE.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_convol.pro)


M_ERRORF

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_ERRORF
 VERSION:
	3.0
 PURPOSE:
	Calculates the error function.  Replacement for the IDL ERRORF function
	which accepts only real input.
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	Result = M_ERRORF (X [, /COMPLEMENTARY)]
 INPUTS:
    X
	Numeric, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /COMPLEMENTARY
	Switch.  If set, 1 - ERRORF(X) is returned.
 OUTPUTS:
	Returns the error function of X or, if /COMPLEMENTARY is set,
	1 - error_function.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	For very large (in absolute value) complex values of x, with 
		pi/4 < |abs(phase(x))| < 3*pi/4
	the results may be meaningless.  A warning will be issued in this case.
 PROCEDURE:
	Uses CAST and M_IGAMMA from MIDL.
 MODIFICATION HISTORY:
	Created 20-MAR-1996 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_errorf.pro)


M_GAMMA

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_GAMMA
 VERSION:
	3.0
 PURPOSE:
	Calculates the gamma function.  Replacement for the IDL GAMMA function 
	which accepts only real input.
 CATEGORY:
	Mathematical, general.
 CALLING SEQUENCE:
	Result = GAMMA (X)
 INPUTS:
    X
	Numeric, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the gamma function of X.  Output type is same as input (but no
	lower than FLOAT), form is same as input.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	The real part of X should be greater than 0.
 PROCEDURE:
	Calls M_LNGAMMA.
 MODIFICATION HISTORY:
	Created 30-MAR-1996 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_gamma.pro)


M_IGAMMA

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_IGAMMA
 VERSION:
	3.0
 PURPOSE:
	Calculates the incomplete gamma function.  Replacement for the IDL 
	IGAMMA function which accepts only real input.
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	Result = M_IGAMMA (X, A [,EPS ] [,/COMPLEMENTARY ])
 INPUTS:
    X
	Numeric, otherwise arbitrary.
    A
	Numeric scalar, non-complex, positive.
 OPTIONAL INPUT PARAMETERS:
    EPS
	Specifies precision level.  Default is machine precision.
 KEYWORD PARAMETERS:
    /COMPLEMENTARY
	Switch.  If set, 1 - IGAMMA(X) is returned.
 OUTPUTS:
	Returns the incomplete gamma function of x, unless /COMPLEMENTARY is
	set in which case returns 1 - the incomplete gamma function.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	For reasons having to do with machine limits on sizes of numbers, the
	parameter A cannot be too big.  The limit is roughly given by

	A < P + (Ln(2*P))/2

	Where P is the (natural) logarithm of the largest number the machine 
	can process.  The limit is machine dependent.

	Also, for values of X with large negative real part the calculation 
	cannot converge and the result is replaced with a very large number
	(machine limit).  A warning is displayed in this case.
 PROCEDURE:
	Uses series expansion for small ABS(X) and continued fraction
	expansion for larger values.  Calls CAST, CONFRAC, DEFAULT, ISNUM, 
	M_ABS, M_LNGAMMA, and TOLER, from MIDL.
 MODIFICATION HISTORY:
	Created 15-MAR-1996 by Mati Meron.
	Modified 20-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_igamma.pro)


M_IMAGINARY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_IMAGINARY
 VERSION:
	3.0
 PURPOSE:
	Returns imaginary values.
 CATEGORY:
	Mathematical, general.
 CALLING SEQUENCE:
	Result = M_IMAGINARY (X)
 INPUTS:
    X
	Numerical, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the imaginary part of the input, i.e. 0 if the input is real
	the imaginary part in FLOAT format for COMPLEX and the imaginary part 
	in DOUBLE format for DCOMPLEX.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Calling FPU_FIX and ISNUM from MIDL.
 MODIFICATION HISTORY:
	Created 5-MAY-1996 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_imaginary.pro)


M_LINFIT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_LINFIT
 VERSION:
	3.0
 PURPOSE:
	Linear fitting with an arbitrary number of parameters.
 CATEGORY:
	Mathematical Function.
 CALLING SEQUENCE:
	Result = M_LINFIT( X, Y [,W] [, keywords])
 INPUTS:
    X
	Numeric vector.  X coordinates of the data.
    Y
	Numeric vector.  Y coordinates of the data.  Same length as X.
 OPTIONAL INPUT PARAMETERS:
    W
	Numeric vector.  Weight parameters.  Same length as X.  Default is
	constant weight (1).
 KEYWORD PARAMETERS:
    ORDER
	Specifies the order of the fit, i.e. one less than the number of free 
	parameters (or base functions).  If not given, the order will be read 
	from the number of entries in the BASE variable (see below).  If both
	ORDER and BASE are specified, the higher one will determine the order.
	Finally, if neither is specified, ORDER is set to 1 (meaning linear fit)
    RESIDUAL
	Optional output, see below.
    BASE
	Character array containing names of base functions.  Any blank entry 
	will be replaced by a power of X.  For example, if the third entry 
	(i = 2) is blank (or null string) the third base function will be X^2.
    PARAMS
	Array containing optional parameters (one per function) to be used in
	the function calls.  
    PARMASK
	Parameter mask, specifies which of the parameters are to be used.  A 
	nonzero entry means USE, zero means DON'T USE.  Default is USE for all
	existing parameters.
 OUTPUTS:
	Returns a vector containing the fit coefficients.
 OPTIONAL OUTPUT PARAMETERS:
    RESIDUAL
	The name of the variable to receive the residual Chi-Square value, 
	normalized to the number of degrees of freedom.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Standard linear optimization, using a Singular Value Decomposition
	procedure to solve the linear system.  Uses DEFAULT, FPU_FIX, 
	SOLVE_LINSYS and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 1-JUN-93 by Mati Meron.
	Renamed from LINFIT to M_LINFIT to avoid clashes with an IDL library
	routine bearing the same name.
	Modified 20-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_linfit.pro)


M_LNGAMMA

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_LNGAMMA
 VERSION:
	3.0
 PURPOSE:
	Calculates the natural log of the gamma function.  Replacement for the 
	IDL LNGAMMA function which accepts only real input.
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	Result = M_LNGAMMA (X, A [,EPS ] [,/COMPLEMENTARY ])
 INPUTS:
    X
	Numeric, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the natural logarithm of the gamma function of X.  Output type
	and form are identical to those of the input (but output type is never
	lower than FLOAT).
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	The real part of X should be positive.
 PROCEDURE:
	Uses a continued fraction expansion.  Calls CAST, CONFRAC, DEFAULT, 
	TYPE and TOLER, from MIDL.
 MODIFICATION HISTORY:
	Created 30-MAR-1996 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_lngamma.pro)


M_NERFC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_NERFC
 VERSION:
	3.0
 PURPOSE:
	Calculates A renormalized complementary error function.
 CATEGORY:
	Mathematical function.
 CALLING SEQUENCE:
	Result = M_NERFC( X )
 INPUTS:
    X
	Numeric, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
 OUTPUTS:
	Returns the values of exp(x^2)*(1 - errorf(x)).  For larger values
	of ;	X, above ~4, this values cannot be calculated directly from the
	error function due to cancellation errors.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	For large and negative values of Real(x) an overflow may result.  A
	warning is issued in such case.
 PROCEDURE:
	Using direct calculation for small values of abs(x) and continued
	fraction expansion for larger values.  Call CAST, CONFRAC, ISNUM,
	M_ABS, M_ERRORF, M_IMAGINARY and M_REAL, from MIDL.
 MODIFICATION HISTORY:
	Created 20-DEC-1994 by Mati Meron, under the name RENERF_FUN.
	Renamed M_NERFC and completely rewritten 15-JAN-1996, by Mati Meron, 
	in order to enhance range and accuracy.  
	Modified 25-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_nerfc.pro)


M_REAL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_REAL
 VERSION:
	3.0
 PURPOSE:
	Returns real values.
 CATEGORY:
	Mathematical, general.
 CALLING SEQUENCE:
	Result = M_REAL (X)
 INPUTS:
    X
	Numerical, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Returns the real value of the input, i.e. the input itself if its real
	the real part in FLOAT format for COMPLEX and the real part in DOUBLE
	format for DCOMPLEX.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Calling CAST, FPU_FIX and ISNUM from MIDL.
 MODIFICATION HISTORY:
	Created 5-MAY-1996 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_real.pro)


M_SMOOTH

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	M_SMOOTH
 VERSION:
	3.0
 PURPOSE:
	Non broadening data smoothing.
 CATEGORY:
	Array function.
 CALLING SEQUENCE:
	Result = M_SMOOTH( ARR, WID [keywords])
 INPUTS:
    ARR
	Array, numeric, no more than six dimensions.
    WID
	The width of the smoothing window.  Can be given either as a scalar (in
	which case it is applied to all the dimensions of the array, or as a 
	vector (in which case each entry applies to one dimension).  The WIDTH
	entry(s) should be an odd number(s), if it is even the next higher odd 
	number(s) will be used.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    DERIV
	Causes the smoothed derivative (first or second) of the data to be 
	returned instead of the data itself.  Currently valid only for 1D 
	arrays.
    /EDGE_TRUNCATE
	Switch.  Same as in the IDL version of SMOOTH.
 OUTPUTS:
	Returns the smoothed array or (optionally) its first or second 
	derivative.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses a variation of the Savitzky-Golay procedure.  Superior to the IDL
	provided SMOOTH routine in the sense that it doesn't introduce peak 
	broadening.  Note that:

	1)  The width needed obtain a given degree of smoothing is about twice 
	    as big as with SMOOTH (which isn't a problem since this extra width
	    doesn't cause broadening.
	2)  Since the averaging kernel isn't positive definite, in some rare
	    cases (high and very narrow peaks with little or no background)
	    M_SMOOTH may generate artifacts.

	Calls CAST, DEFAULT, DIAGOARR, MAKE_GRID, M_CONVOL, SOLVE_LINSYS and
	TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 25-JAN-1997 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/m_smooth.pro)


NATAN

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	NATAN
 VERSION:
	3.0
 PURPOSE:
	Calculates the function /int{(1 + x^2)^(-n-1)}, or, optionally,
	/int{(1 - x^2)^(-n-1)}
 CATEGORY:
	Mathematical function.
 CALLING SEQUENCE:
	Result = NATAN( X [, N [, /HYPER]])
 INPUTS:
    X
	Numerical, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
    N
	Integer scalar, defaults to 0.
 KEYWORD PARAMETERS:
    /HYPER
	Switch, turns on the "hyperbolic" option.
 OUTPUTS:
	Returns /int{(1 + x^2)^(-n-1)} (for N = 0 it amounts to ATAN(X)), or, 
	if /HYPER is set, /int{(1 - x^2)^(-n-1)} (for N = 0 this is the 
	hyperbolic ATAN).  The result is of the same form as X, of type FLOAT 
	or higher (if X is of a higher type).
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	N must be >= 0, otherwise it is taken to be 0.
 PROCEDURE:
	Exact evaluation in powers of 1/(1 + x^2).  Uses CAST, DEFAULT, FPU_FIX
	and TYPE from MIDL.
 MODIFICATION HISTORY:
	Created 30-MARCH-1994 by Mati Meron.
	Modified 15-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/natan.pro)


NEIGHBORS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	NEIGHBORS
 VERSION:
	3.0
 PURPOSE:
	Finding the nearest neighbors of an array element.
 CATEGORY:
	Array function.
 CALLING SEQUENCE:
	Result = NEIGHBORS( IND, SIZ [, COUNT])
 INPUTS:
    IND
	Index of an array element.  Provided either in contracted (1-dim) or
	expanded version.  In the second case IND has to be a vector the length 
	of which equals the number of dimension of the array (given by SIZ(0)).
    SIZ
	Vector in the form of the standard output of the system function SIZE.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    COUNT
	An optional output parameter.  See below.
 OUTPUTS:
	Returns a vector containing the indices of the nearest neighbors of the
	element corresponding to IND.  If no neighbors exist returns -1.
 OPTIONAL OUTPUT PARAMETERS:
    COUNT
	The name of the variable to receive the number of neighbors.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Calls ARRLOC from MIDL.
 MODIFICATION HISTORY:
	Created 30-MARCH-1994 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/neighbors.pro)


NOISE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	NOISE
 VERSION:
	3.0
 PURPOSE:
	Adds Gaussian or Poissonian noise to data.
 CATEGORY:
	Mathematical function.
 CALLING SEQUENCE:
	Result = NOISE( DAT [, keywords])
 INPUTS:
    DAT
	numerical, nonnegative.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    /POISSON
	Switch.  If set, Poisson noise is generated.  The default is gaussian.
    SEED
	Can be used to provide a randomization seed.  Optional but highly 
	recommended (with an uninitialized variable) when doing repeated calls
	to NOISE.  See RESTRICTIONS below.
 OUTPUTS:
	Returns the input data with noise added to it.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	NOISE relies on the IDL routines RANDOMU and RANDOMN which, in the 
	absence of externally provided seed generate one using the system
	time.  When consecutive calls to NOISE are made on a fast machine,
	they may occur within a single "clock tick" yielding the same random 
	series.  This is highly undesirable.  The problem can be avoided if
	NOISE is always called with SEED = S when S is an uninitialized 
	variable.
 PROCEDURE:
	Generates Gauss-distributed (with sigma = square_root(dat)) random 
	numbers for gaussian noise.  Uses the rejection method for Poisson 
	noise.  Calls CAST, DEFAULT and FPU_FIX from MIDL.  
 MODIFICATION HISTORY:
	Created 25-JAN-1997 by Mati Meron.
	Modified 10-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/noise.pro)


ONE_OF

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	ONE_OF
 VERSION:
	3.0
 PURPOSE:
	Called with up to 8 variables V_0 through V_7 , ONE_OF checks which 
	variable is defined (only one is supposed to be).
 CATEGORY:
	Programming.
 CALLING SEQUENCE:
	Result = ONE_OF( V_0 [,V_1, ... V_7] [, VALUE = VAL])
 INPUTS:
    V_0 through V_7
	Arbitrary, all are optional.
 OPTIONAL INPUT PARAMETERS:
	See above.
 KEYWORD PARAMETERS:
    VALUE
	Optional output, see below.
 OUTPUTS:
	Returns the serial number (range 0 through 7) of the defined variable,
	or -1 if none is defined.  If more than one variable is defined, ONE_OF
	issues an error message and returns to the main level.
 OPTIONAL OUTPUT PARAMETERS:
    VALUE
	The name of the variable to receive the value of the single defined
	variable, or a null string if none is defined.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Currently ONE_OF is restricted to a maximum of 8 variables.  If needed,
	the number can be increased.
 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 30-JUL-1991 by Mati Meron.  The dependence of the original 
	code on the EXECUTE system routine has been eliminated in order to 
	assure compatibility with the OUTPUT routine.
	Modified 15-NOV-1993 by Mati Meron.  Since IDL now allows for recursive
	calls to EXECUTE, the original code has been restored.

(See /host/bluemoon/usr2/idllib/contrib/meron/one_of.pro)


OUTPUT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	OUTPUT
 VERSION:
	3.0
 PURPOSE:
	Generic output interface.  Allows sending the results of virtually any
	IDL command or file to any predefined hard copy device.  In detail,
	OUTPUT executes the provided command, writes the output to a file and 
	sends the file to a printout que.  Currently a VMS routine only.
 CATEGORY:
	Input/Output.
 CALLING SEQUENCE:
	OUTPUT, COMM [, keywords] [,optional input parameters]
 INPUTS:
    COMM
	Character value representing a valid IDL command.  Can be (and usually
	is) a procedure or function call.
 OPTIONAL INPUT PARAMETERS:
    V_0 through V_7
	Serve to pass variables which are used in the command COMM.  Since COMM
	is passed to output as a single string, OUTPUT is not receiving the 
	values of any variables used by COMM.  If such values are needed they
	have to be passed separately.  This is done using the variables V_0
	through V_7 in combination with the keyword SUBST (see below), which
	accepts a string made of the names of the variables separated by spaces
	or commas.
	Example:
	    Assume a routine named NEWPLOT which is called using the syntax
		NEWPLOT, I, X, SCOPE = Y
	    If at the time of call I, X, and Y have known values, say 3, 12.4
	    and [12,95] then it is possible to issue the command
		OUTPUT, 'NEWPLOT, 3, 12.4, SCOPE = [12,95]'
	    If, on the other hand one would want to pass NEWPLOT to output 
	    using the variables K, E and RANG for I, X, Y, the command can be
		OUTPUT, 'NEWPLOT, I, X, SCOPE = Y', $
		SUBST = 'I,X   Y', K, E, RANG
	    The order in which the variable names appear in SUBST is arbitrary
	    but it has to be in a one-to-one correspondence with the order in 
	    which the actual arguments are given.  Therefore, the following is
	    equally valid
		OUTPUT, 'NEWPLOT, I, X, SCOPE = Y', $
		SUBST = 'Y, I, X', RANG, K, E
 KEYWORD PARAMETERS:
    QUE
	Accepts a string and sets the printout queue.  Currently accepted 
	values and the queues they represent are as follows:
	    'LN03'	-  The LN03 printer at the X26.
	    'SIXEL'	-  The SIXEL printer in 901.
	    'EPS'	-  Writes an encapsulated PostScript file, no printout.
	    'FILE'	-  Writes a PostScript file, no printout.
	    'PHASER'	-  Phaser color printer.  Valid only in BNL.
	    'TRANSP'	-  Phaser Printer with LEGAL sized paper.  Use this
			   one for transparencies.
	    'CARS1'	-  The PostScript printer at CARS1.
	    'SYS$PRINT'	-  Generic PostScript.  This is the initial Default.
	This is by no means the final list, as new queues keep being added from
	time to time.  For all queues on this list only the first three 
	characters of the name are needed as input.
	If a queue name not on the list is entered, OUTPUT will use this name
	with the parameters of the default queue, SYS$PRINT.  If no queue name
	is entered, output will use SYS$PRINT when first called, and the name 
	of the last queue used subsequently.
    FIL
	Accepts a string representing a valid VMS file name.  
	Extension isn't necessery.  Default is 'IDL'.
    /KEEP
	Switch.  Specifies file disposition.  If set, the file is kept after 
	printout.  The default is 'DELETE', unless the queue is 'EPS' or 'FILE'.
    /BEEP
	Switch.  If set, a beep will sound when OUTPUT finishes processing the 
	file, and another beep sounds when the printout is complete.  Useful 
	for long files.  Also, if set, the VAX verifies that the printer is on.
    OPTION
	Accepts a string representing a valid IDL command.  If given, this
	command will be executed BEFORE COMM.  If the command in OPTION 
	includes variables, their values can be passed using the same mechanism
	as the one used for COMM (see above).
    MAIL
	Name of a recipient to whom the resulting file is mailed.  Optional.
    SUBST
	Accepts a string containing the names of the variables which are to 
	receive the values V_0 through V_7 (or part of them) for substitution
	purposes.  Commas and/or spaces are valid delimiters.
 OUTPUTS:
	None, other then the file that's created and whatever outputs are 
	generated by COMM.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	M_OUT_PREFS.  Contains the name of the last queue used.
 SIDE EFFECTS:
	OUTPUT tries to avoid any side effects, as far as possible.  
	Specifically, the values of all the system variables are reset at exit
	from OUTPUT to the values they had before output was called.  Still,
	since COMM can be any possible command, side effects cannot be totally
	avoided.
	A currently known side effect has to do with PostScript printers.  If
	either COMM or OPTION change the postscipt settings, the new settings
	will remain in effect after OUTPUT exits.
 RESTRICTIONS:
    1) With IDL before version 3.1, the commands in COMM and OPTION (if used) 
	are not allowed to use calls to the EXECUTE system routine, either 
	directly or indirectly.  This is so since OUTPUT itself relies on 
	EXECUTE and since EXECUTE (in older versions of IDL) could not be 
	called recursively.
    2) Currently the number of substitution variables is limited to 8.  If 
	it'll turn out that this number isn't sufficient it can be easily 
	increased.  Let me know.
    3) The commands in COMM (and OPTION) shouldn't change the output device
	(i.e. NO using SET_PLOT, DEVICE/CLOSE, etc., all this is taken care of
	by OUTPUT).  If they do, no error will result but the outcome will be 
	unpredictable.
    4) In order to make the best use of OUTPUT it is recommended that the
	commands in COMM will be totally device independent (i.e. no using 
	explicit device coordinates etc.).  This allows to send the output of 
	the same procedure to the various printers and get consistent results.
	If one finds it necessery to use some device specific commands (like
	setting a color table for the Phaser printer), they should be put in
	OPTION (that's really the whole purpose of having OPTION)
 PROCEDURE:
	OUTPUT contains a list of the appropriate device opening and closing
	commands for the ques it recognizes.  When called, it does the 
	following.
	1)  Checks QUE and if recognizable generates the appropriate OPEN, 
	CLOSE and PRINTOUT commands.  If QUE isn't recognized, OUTPUT assumes
	SYS$PRINT.
	2)  Performs variable substitution if so specified (by a non-blank 
	value of SUBST)
	3)  Opens device.
	4)  Executes OPTION, if given.
	5)  Executes COMM
	6)  Closes device.
	7)  Optionally mails the file to the specified recipient.
	8)  Spawns PRINT command to the appropriate que (unless que = 'EPS' or 
	'FILE' is specified).
	9)  Deletes the file unless specified otherwise.

	OUTPUT uses various routines from MIDL, namely:
	TYPE, DEFAULT, STREQ, STRMATCH, STRPARSE and PLVAR_KEEP.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 15-SEP-1991 by Mati Meron.  Added Phaser and Sixel support.
	Modified 15-NOV-1991 by Mati Meron.  Added the 'TRANSP' que and the
	/BEEP keyword.
	Modified 28-DEC-1991 by Mati Meron.  Now any changes made to the color
	table of PostScript devices by either COMM or OPTION are undone before
	OUTPUT exits.
	Modified 15-MAY-1993 by Mati Meron.  Added 'EPS', 'FILE' and 'CARS1'
	queues.
	Modified 20-NOV-1993 by Mati Meron.  Introduced SYS$PRINT as default
	queue and maintenance of last que as current default.

(See /host/bluemoon/usr2/idllib/contrib/meron/output.pro)


PARTOT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	PARTOT
 VERSION:
	3.0
 PURPOSE:
	Array summation.
 CATEGORY:
	Array Function.
 CALLING SEQUENCE:
	Result = PARTOT( FARR [, TOD] [, keywords])
 INPUTS:
    FARR
	Array, numeric, otherwise arbitrary (scalars accepted too).
 OPTIONAL INPUT PARAMETERS:
    TOD
	Totaling dimension.  Must be integer in the range of 
	[1, number of array dimensions]
 KEYWORD PARAMETERS:

	warning!!!
	The keywords are divided into two groups
	1) regular mode:	LOW, HIGH, LOFRINGE, HIFRINGE
	2) symmetric mode	SYMEDGE, SYMFRINGE

	Either group (1) or (2) may be used.  Mixing will cause error.

    LOW
	Numeric vector (or scalar) containing starting channels for summation
	for each dimension.  First entry corresponds to first dimension, 
	second to second dimension etc.  If number of entries is smaller then
	number of dimensions, the remaining ones are replaced by 0.  If it is
	larger then number of dimensions, the excess is ignored.  If absent,
	all the values are replaced by 0.
	Alternatively:  If TOD is used, LOW must be scalar (or vector of length
	1), providing the summation start for the dimension specified by TOD.
	Again, if absent, it is replaced by 0.
    HIGH
	Numeric vector (or scalar) containing starting channels for summation
	for each dimension.  First entry corresponds to first dimension, 
	second to second dimension etc.  If number of entries is smaller then
	number of dimensions, the remaining ones are replaced by 0.  If it is
	larger then number of dimensions, the excess is ignored.  If absent,
	all the values are replaced by 0.
	Alternatively:  If TOD is used, LOW must be scalar (or vector of length
	1), providing the summation start for the dimension specified by TOD.
	Again, if absent, it is replaced by 0.
    HIGH
	Same as LOW for ending summation channel.  Missing values are replaced
	by maximal value.  For example, if the array has dimensions [7,8,12]
	and HIGH is given as [6,5] then internally [6,5,11] is used (maximal
	value is always dimension - 1).
    LOFRINGE
	Numeric vector (or scalar) specifying partial counting of the value
	in the first summation channel.  Acceptable values are in the 
	[-0.5, 0.5] range.  For example if the array has dimensions [6,8,10], 
	LOW is [2,1,5] and LOFRINGE = [0.2, 0.3,-0.4] then the beginning 
	elements in the first dimension, arr(2,*,*), will be multiplied by
	(1 + 0.2) = 1.2 while the beginning elements in the third dimension,
	arr(*,*,5) will be multiplied by (1 - 0.4) = 0.6.  If the number of
	entries is shorter then the number of dimensions, it'll be padded with
	zeros.  If it is larger, the excess will be ignored.  If absent 
	alltogether, zeros will be used.
	Alternatively:  If TOD is used, LOFRINGE must be scalar (or vector of 
	length 1), and is applied to the summation dimension specified by TOD.
	Again, if absent, it is replaced by 0.
    HIFRINGE	
	Same as LOFRINGE but applied to the ending channel.

    SYMEDGE
	Used in a symmetrical mode.  IN this case the start and end channels 
	for each dimension are counted symmetrically from the center.  If the
	number of channels in a specific dimension is odd then the center is 
	the middle channel.  For example for a vector of length 9 (indices
	0 through 8) index of 4 (fifth element) gives the center.  For a vector
	of length 8 (indices 0 through 7) the center is at the imaginary point
	between indices 3 and 4.
	Example:
	Assume and array with dimensions [8,9,10] and SYMEDGE given as [3,3]
	Thus:
	On first dimension summation is from index 1 to index 6 (3 on each side
	of the center, 6 total).
	On second dimension summation is from index 1 to index 7 (3 on each 
	side, 7 total since the center is now also included).
	On third dimension, since no data is provided, the summation is from
	index 0 to index 9 (i.e full)
	Alternatively:  If TOD is used, SYMEDGE must be scalar (or vector of 
	length 1), and is applied to the summation dimension specified by TOD.
    SYMFRINGE
	Same as LOFRINGE and HIFRINGE in the regular case.  Applied to both
	summation limits, symmetrically.
 OUTPUTS:
	Scalar equal the value of the summation, unless TOD is used, in which
	case the output is an array with one less dimension then the original 
	one.  This is identical to the behavior of the IDL function TOTAL.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	1)  The array must be numerical.
	2)  Mixing keywords from the regular and symmetrical group is not 
	    allowed.
	3)  The value of TOD cannot exceed the number of dimensions.
	4)  If TOD is used, all the edges and fringes provided by the 
	    keywords must have no more then one element.
	5)  The values given by LOW mustn't exceed these given by HIGH.
 PROCEDURE:
	A straightforward generalization on the IDL function TOTAL, making it
	closer to a variable limit numerical integration.  Calling DEFAULT and
	ISNUM from MIDL.
 MODIFICATION HISTORY:
	Created 30-OCT-1996 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/partot.pro)


PLOTOT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	PLOTOT
 VERSION:
	3.0
 PURPOSE:
	Plots multiple data sets on a single plot.
 CATEGORY:
	Plotting.
 CALLING SEQUENCE:
	PLOTOT, [X,] Y [, optional keywords]
 INPUTS:
    Y
	A numeric vector or 2 dimensional array containing the Y coordinates of
	the data.  If Y is a vector PLOTOT operates same as PLOT.  If it is 
	a 2-dim.array, each row is ploted separately.  It is assumed that the
	number of points per plot is larger than the number of plots so that if
	Y is an (M*N) array with N > M, it will be transposed prior to plotting.
 OPTIONAL INPUT PARAMETERS:
    X
	A numeric vector containing the X coordinates of the data.  If absent 
	it is replaced by the vector [0, 1, 2 ...].
 KEYWORD PARAMETERS:
    XTYPE
	Standard IDL plotting interpretation.
    YTYPE
	Ditto.
    /YNOZERO
	Ditto.
    PSYM
	Ditto.  If given as a vector consecutive elements are applied to
	consecutive plots. 
    LINESTYLE
	Ditto.  If given as a vector consecutive elements are applied to
	consecutive plots. 
    COLOR
	Ditto.  If given as a vector consecutive elements are applied to
	consecutive plots. 
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Uses calls to DEFAULT, SIGN and WHERINSTRUCT in MIDL.
 MODIFICATION HISTORY:
	Created 30-JUL-1991 by Mati Meron.
       Modified 15-JAN-1994 by Mati Meron.  Now PLOTOT takes advantage of the
       keyword inheritance property and accepts all IDL plotting keywords.

(See /host/bluemoon/usr2/idllib/contrib/meron/plotot.pro)


PLOT_VER2

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	PLOT_VER2
 VERSION:
	3.0
 PURPOSE:
	Draws 2 plots, vertically spaced, with a possibility of multiple curves
	on each plot.
 CATEGORY:
	Plotting.
 CALLING SEQUENCE:
	PLOT_VER2, [X,] Y0, Y1 [, optional keywords]
 INPUTS:
    Y0
	A numeric vector or 2 dimensional array containing the Y coordinates of
	the data for the top plot.  If Y is a 2-dim.array, each row is ploted 
	separately.  It is assumed that the number of points per plot is larger
	 than the number of plots so that if Y is an (M*N) array with N > M, it
	 will be transposed prior to plotting.
    Y1
	Same as Y0 for the bottom plot.
 OPTIONAL INPUT PARAMETERS:
    X
	A numeric vector containing the X coordinates of the data.  If absent 
	it is replaced by the vector [0, 1, 2 ...].
 KEYWORD PARAMETERS:
    RATIO
	Size ratio between top and bottom plot.  Default is 1.
    GAP
	Width of the gap between the plots in character units.  Default is 0.1
    XMARGIN
	Standard IDL plotting interpretation.
    YMARGIN
	Ditto.
    XTYPE
	Ditto.
    YTYPE
	Ditto.  If given as 2-element vector, elements 0 and 1 apply to top and 
	bottom plots, respectively.
    YNOZERO
	Ditto.  If given as 2-element vector, elements 0 and 1 apply to top and 
	bottom plots, respectively.
    TITLE
	Ditto.
    XTITLE
	Ditto.
    YTITLE
	Ditto.  If given as 2-element vector, elements 0 and 1 apply to top and 
	bottom plots, respectively.
    PSYM
	Ditto.  If given as a vector consecutive elements are applied to
	consecutive curves on each plot.
    LINESTYLE
	Ditto.  If given as a vector consecutive elements are applied to
	consecutive curves on each plot.
    COLOR
	Ditto.  If given as a vector consecutive elements are applied to
	consecutive curves on each plot.
    _EXTRA
       A formal keyword used to pass all plotting keywords.  Not to be used
       directly.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Uses calls to DEFAULT, PLVAR_KEEP, and PLOTOT from
	MIDL.
 MODIFICATION HISTORY:
	Created 30-JUL-1991 by Mati Meron.
       Modified 15-JAN-1994 by Mati Meron.  Now PLOT_VER2 takes advantage of 
	the keyword inheritance property and accepts all IDL plotting keywords.

(See /host/bluemoon/usr2/idllib/contrib/meron/plot_ver2.pro)


PLVAR_KEEP

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	PLVAR_KEEP
 VERSION:
	3.0
 PURPOSE:
	Saves or restores the values of system variables.  
 CATEGORY:
	Input/output.
 CALLING SEQUENCE:
	PLVAR_KEEP, ACTION = ACT [, /RESET]
 INPUTS:
	None.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    ACTION
	Specifies the action to take.  Two possible values, 'SAVE' and 
	'RESTORE' (only first three characters count).
    /RESET
	Switch.  Protection bypass.  Normally multiple calls to PLVAR_KEEP are 
	counted but no action is taken after the first.  For example, if 3 
	consecutive calls with ACTION = 'SAVE' were issued then the system 
	variables are saved on the first call and nothing happens on the next 
	two.  Then, when calls with ACTION = 'RESTORE' are issued, only the 
	third call will have an effect.  This mechanism allows using 'SAVE' and
	'RESTORE' calls as pairs of braces around program sections.  For the 
	(rare) cases when one wants to save or restore regardless of previously
	issued calls, setting RESET disables the protection mechanism.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	M_PLVARS
 SIDE EFFECTS:
	None when used properly.  If the numbers of SAVEs and RESTOREs are not
	equal, either due to an omission or to an error in a called routine, 
	the settings won't be restored to their initial state.  In this case 
	the cure is to execute 
		PLVAR_KEEP, ACTION = 'RESTORE', /RESET
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses a common block (M_PLVARS) to save and restore the values of:
	!P, !X, !Y, !Z, !D.NAME.  Also uses the routines DEFAULT, TYPE and
	STRMATCH from MIDL.
 MODIFICATION HISTORY:
	Created by 15-JUL-1991 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/plvar_keep.pro)


POLEVAL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	POLEVAL
 VERSION:
	3.0
 PURPOSE:
	Evaluates a polynomial function according to the formula:
	    F = c(0) + c(1)*X + ... + c(n)*X^N
	Similar to the library routine POLY.  The difference is that when the
	keyword QUOTIENT is used, the routine returns, in QCOEF, the values of 
	the coefficients of the quotient polynomial.  In other words, given the
	coefficients of a polynomial P, and a value Xc, the function returns 
	the value P(Xc), and in QCOEF are returned the coefficients of the 
	polynomial Q(X) = P(X)/(X - Xc).  Note that unless P(Xc) is 0, the 
	division has a remainder.
 CATEGORY:
	Mathemetical function (general).
 CALLING SEQUENCE:
	Result = POLEVAL( X, COEF [, QUOTIENT = QCOEF])
 INPUTS:
    X
	Numeric, otherwise arbitrary.
    COEF
	Numeric vector.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    QUOTIENT
	An optional output parameter.  See below.
 OUTPUTS:
	Returns the value of the polynomial at X.  The result has the same 
	structure and number of elements as X and the same type as the higher
	of X and COEF.
 OPTIONAL OUTPUT PARAMETERS:
    QUOTIENT
	The name of the variable to receive the quotient polynomial.  The 
	quotient is an array with one more dimension than X.  For example, if
	X is given as an array with dimensions (10,8,64) and the order of the 
	polynomial is 4 then the dimensions of the quotient will be (10,8,64,4).
	QCOEF(4,5,6,*) will then contain the coefs. of P(X)/(X - X(4,5,6)), etc.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Standard Horner evaluation.  Uses the functions DEFAULT and FPU_FIX
	from MIDL.
 MODIFICATION HISTORY:
	Created 15-NOV-1991 by Mati Meron.
	Modified 10-SEP-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/poleval.pro)


PRINUMS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	PRINUMS
 VERSION:
	3.0
 PURPOSE:
	Calculates a table of prime numbers in the range NLO - NHI.
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	List = PRINUMS( [NLO,] NHI)
 INPUTS:
    NHI
	Upper limit of the range of the primes table.  Converted to long 
	integer on input.
 OPTIONAL INPUT PARAMETERS:
    NLO
	Lower limit of the prime table range.  Converted to long integer on 
	input.If not provided, i.e. if only one input parameter is provided, 
	NLO defaults to 1.
 KEYWORD PARAMETERS:
    /BYPASS
	Switch.  Used only on internal calls.
 OUTPUTS:
	Returns the list of primes between NLO and NHI (inclusive), as long
	integer.  If no primes are found, returns 0.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Inputs must be positive.  If both NLO and NHI are given, NHI >= NLO.
 PROCEDURE:
	Uses the Sieve of Erasthotenes algorithm.  Generates the primes table 
	calling itself recursively.
 MODIFICATION HISTORY:
	Created 15-NOV-1991 by Mati Meron.
	Modified 15-DEC-1993 by Mati Meron.  Combined previous PRIMES and 
	PR_SIEVE in a single routine.
	Modified 20-JUN-1995 by Mati Meron.  Renamed PRINUMS to avoid conflict
	with an IDL routine bearing the same name.

(See /host/bluemoon/usr2/idllib/contrib/meron/prinums.pro)


RANDISC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	RANDISC
 VERSION:
	3.0
 PURPOSE:
	Generates a set of discretely distributed random numbers.
 CATEGORY:
	Mathematical function.
 CALLING SEQUENCE:
	Result = RANDISC (SEED,  [,parameters] [,keywords])
 INPUTS:
    SEED
	A named variable containing the seed value for random number generation.
	Does not need to be defined prior to call.  For details see IDL 
	routines RANDOMN and RANDOMU.
 OPTIONAL INPUT PARAMETERS:
    D_0 through D_7
	Dimensions of the result.  All default to 1.  Trailing dimensions of 1
	are removed.
 KEYWORD PARAMETERS:
    AMPLITUDE
	Numerical value, rounded to long integer on input.  Specifies the 
	output range.  Output values are randomly spread among AMP + 1 possible
	values ranging from -AMP to AMP (unless the keyword NORMALIZE is used),
	with a spacing of 2.  Default value of AMP is 1.
    /UNIFORM
	Switch.  Specifies uniform distribution.  This is the default.
    /BINOMIAL
	Switch.  Specifies binomial distribution.  For large values of AMP the
	result approaches a Gaussian with sigma = sqrt(AMP)
    /NORMALIZE
	Switch.  If set, the result is normalized to lie in the [-1,1] range,
	with a spacing of -2/AMP
 OUTPUTS:
	Returns number randomly distributed among the values 
	-AMP, -AMP + 2 ... AMP or, if the keyword NORMALIZE is set, among
	-1, -1 + 2/AMP ... 1.  The distribution may be uniform (the default) or
	binomial (quasi gaussian).  The result can have any number (up to 8) of
	dimensions which are specified by the optional variables D_0, ... D_7.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	On return, SEED is replaced with the new value of the randomizer seed.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses the system routine RANDOMU.  Also uses DEFAULT and ONE_OF from 
	MIDL.
 MODIFICATION HISTORY:
	Created 20-APR-1995 by Mati Meron.

(See /host/bluemoon/usr2/idllib/contrib/meron/randisc.pro)


RASCII

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	RASCII
 VERSION:
	3.0
 PURPOSE:
	Reads data from an ASCII file into an array.  It is assumed that the 
	file contains columns of numbers, with the same number of entries in
	each row.  The numbers may be separated by commas, spaces and/or tabs.
	The file may contain a header.  The first line in which the first
	non-blank character is one of ".+-0123456789" will be considered the
	beginning of the data.  Text lines imbedded in the data are skipped.
 CATEGORY:
	Input/Output.
 CALLING SEQUENCE:
	Result = RASCII( FILNAM [, optional keywords])
 INPUTS:
    FILNAM
	Char. value, the name of the data file.  Default extension is '.DAT'.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    BUFFER
	Initial number of data rows.  Default is 256.  In any case the result 
	Is trimmed to the actual number.
    /DOUBLE
	If set, the data is input as DOUBLE.  Default is FLOAT.
    /SHOW
	If set, the header (if one exists) will be printed to the screen.
    NPOINTS
	Optional output, see below.
    HEADER
	Optional output, see below.
    SKIP
	Number of lines to skip at the beginning of the file.  This keyword can 
	be used if the header of the file contains lines beginning with 
	".+-0123456789" which would otherwise be read as data.  Default is 0.
 OUTPUTS:
	Returns the data in a (NC,NR) floating (or double precision if DOUBLE 
	is set) array, where NC, NR, are the numbers of columns and rows,
	respectively.  In case of error returns 0.
 OPTIONAL OUTPUT PARAMETERS:
    NPOINTS
	The name of a 2-dim vector to receive the values of NC, NR (see above).
	Doesn't need to be defined prior to the call.  In case of an error 
	returns [0,0].
    HEADER
	The name of a character array to receive the header lines.  Doesn't 
	need to be defined prior to the call.  In case of an error, or if no
	header exists, returns a zero length string.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Straightforward.  Uses DEFAULT, STREQ and STRPARSE from MIDL.
 MODIFICATION HISTORY:
	Created 25-JAN-1992 by Mati Meron.
	Modified 25-MAY-1994 by Mati Meron.  Added buffering and DOUBLE option.
	Modified 14-FEB-1995 by Mark Rivers.  Added keyword SKIP.
	Modified 24-JUL-1995 by Mati Meron.  Removed a UNIX/VMS conflict in the 
	file OPENR statement.
	Modified 10-JUL-1997 by Mati Meron.  Name changed from READ_ASCII to
	RASCII to avoid conflict with the READ_ASCII routine in IDL ver. 5.
	Modified 12-SEP-1997 by Mati Meron.  Added keyword ERROR_STATUS, 
	following a modification by Roger Dejus, XFD/APS.

(See /host/bluemoon/usr2/idllib/contrib/meron/rascii.pro)


RECTAN

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	RECTAN
 VERSION:
	3.0
 PURPOSE:
	Draws a rectangle between the limits specified by XLIMS and YLIMS.  The 
	drawing is done in the currently defined plot area.  DATA coordinate 
	system is assumed unless specified otherwise by one of the keywords 
	/DEVICE or /NORMAL.
 CATEGORY:
	General Graphics.
 CALLING SEQUENCE:
	RECTAN, XLIMS = XLS, YLIMS = YLS [, optional keywords]
 INPUTS:
	None.
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
    XLIMS
	2 dimensional vector, format [xmin,xmax], mandatory.
    YLIMS
	2 dimensional vector, format [xmin,xmax], mandatory.
    ROTATE
	Optional.  Angle of rotation in the mathematical positive direction.
	Assumed in radians, unless DEGREES is set.  Rotation center is the 
	center of the rectangle unless specified otherwise by the keyword
	rotation_center (see below).
    /DEGREES
	Switch.  Specifies that the rotation angle is given in degrees.
    ROTATION_CENTER
	Optional.  Accepts a two element vector specifying the center of 
	rotation.  Ignored if ROTATE is not given.  Defaults to center of shape.
    RADIUS
	Value of radius for rounded corners.
    /RELATIVE
	Switch.  Specifies that the radius value is relative to the shorter 
	side of the rectangle.
    /FILL
	Switch.  Causes the rectangle to be filled with a solid pattern.
    /DEVICE
	Standard IDL plotting interpretation.
    /NORMAL
	Ditto.
    _EXTRA
	A formal keyword used to pass all plotting keywords.  Not to be used
	directly.
 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	RECTAN calls either PLOTS or (when /FILL is used) POLYFILL.  Since
	some graphics keywords work only with PLOTS, or only with POLYFILL,
	some care must be exercised.
 PROCEDURE:
	Uses calls to DEFAULT, ONE_OF, SHAPE_COCON, SHAPE_CLOSE, and 
	SHAPE_TRANS from MIDL.
 MODIFICATION HISTORY:
	Created 15-JUL-1991 by Mati Meron.
	Modified 15-OCT-1991 by Mati Meron.  Added keyword COLOR.
	Modified 15-OCT-1992 by Mati Meron.  Added rotation capability.
	Modified 30-OCT-1992 by Mati Meron.  Added corner rounding capability.
	Modified 15-DEC-1993 by Mati Meron.  Now RECTAN takes advantage of the
	keyword inheritance property and accepts all IDL graphics keywords.

(See /host/bluemoon/usr2/idllib/contrib/meron/rectan.pro)


ROMBERG

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    ROMBERG
 VERSION:
	3.0
 PURPOSE:
	Performs high precision numerical integration.
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	Result = ROMBERG( FUN, RANGE [, EPS [, keywords]])
 INPUTS:
    FUN
	Character value representing an existing IDL function.  The function
	must comply with the IDL standard of being able to accept an array 
	input and return an array output.  The calling sequence for the 
	function must be either
	    Result = FUN(x)
	or
	    Result = FUN(x, extra)
	where X is the variable and EXTRA may be any single entity (scalar, 
	array, structure etc.) used to pass additional parameters to the 
	function.
    RANGE
	Two element vector, integration range.
 OPTIONAL INPUT PARAMETERS:
    EPS
	Allowed integration error.  Default is around 1e-7 for single-precision 
	integration and 2e-16 for double-precision.  EPS is understood to 
	represent absolute error unless the keyword RELATIVE is set.
 KEYWORD PARAMETERS:
    /RELATIVE
	If set, EPS represent the allowed relative integration error.
    PARAMS
	An arbitrary value or variable which is passed to the function FUN.
    TRY
	Normally ROMBERG exits, with STATUS = 2, if the calculation error 
	starts to grow before the convergence criterion is satisfied.  Setting
	TRY to an integer > 0 specifies the number of additional attempts at
	convergence before exit (useful with ill-conditioned functions).  The
	default value is 0.
    ERROR
	Optional output, see below.
    STATUS
	Optional output, see below.
 OUTPUTS:
	Returns the value of the integral.  The result is always a scalar. The
	numerical type of the result (floating, double-precision or complex) is
	determined by the type of values returned by FUN.
 OPTIONAL OUTPUT PARAMETERS:
    ERROR
	The name of the variable to receive the estimated integration error.
	If RELATIVE is set the error returned is relative.
    STATUS
	The name of the variable to receive integration status information.
	Possible values are:
	    0 - Integration didn't converge.
	    1 - OK.
	    2 - Integration converged, but with precision worse then specified.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Enhanced Romberg integration, using the extended midpoint rule and
	Neville's interpolation algorithm.  The process is iterated untill 
	either the desired accuracy is achieved, the maximal allowed number of
	steps is exceeded or further iterations cause the error to grow instead
	of diminishing (the last can be postponed using the TRY keyword).  The 
	procedure can handle functions with an integrable singularity at one 
	(or both) end of the integration interval.
	Uses CAST, DEFAULT, FPU_FIX, ISNUM and TOLER from MIDL.
 MODIFICATION HISTORY:
	Created 15-FEB-92 by Mati Meron.
	Modified 20-JAN-1994 by Mati Meron.  Added keyword TRY.
	Modified 5-OCT-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/romberg.pro)


ROOT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    ROOT
 VERSION:
	3.0
 PURPOSE:
	Finds roots of real functions.
 CATEGORY:
	Mathematical function (general).
 CALLING SEQUENCE:
	Result = ROOT( FUN, RANGE [, EPS [, keywords]])
 INPUTS:
    FUN
	Character value representing an existing IDL function.  The function
	must return scalar values.  It is not necessery for FUN to be able to 
	accept an array input and return an array output.  The calling sequence
	for the function must be either
	    Result = FUN(x)
	or
	    Result = FUN(x, extra)
	where X is the variable and EXTRA may be any single entity (scalar, 
	array, or structure) used to pass additional parameters to the function.
    RANGE
	Two element vector, search range.
 OPTIONAL INPUT PARAMETERS:
    EPS
	Allowed error.  Default is machine precision, according to data type,
	as given by TOLER.  EPS is understood to represent absolute error 
	unless the keyword RELATIVE is set.  The allowed error is dynamically
	adjusted during calculation.
 KEYWORD PARAMETERS:
    /RELATIVE
	If set, EPS represent the allowed relative (to the size of RANGE) error.
    PARAMS
	An arbitrary value or variable which is passed to the function FUN.
    MULTI
	Specifies multiplicity of search (i.e. what is the maximal number of 
	roots to look for.  Default is 1.  If MULTI is set to -1 (or any 
	negative number) the search is unlimited.
    ERROR
	Optional output, see below.
    STATUS
	Optional output, see below.
    DONE
	Optional output, see below.
 OUTPUTS:
	Returns a vector containing the location(s) of the root(s).  The 
	numerical type of the result (floating, or double) is determined by the
	numerical type of RANGE.  If no root is found, returns machine max.
 OPTIONAL OUTPUT PARAMETERS:
    ERROR
	The name of the variable to receive the estimated error of the root 
	location.  Returned as vector, same length as the function output.
    STATUS
	The name of the variable to receive search status information.  
	Returned as vector, same length as the function output.  
	Possible values are:
	    0 - No root found.
	    1 - OK.
	    2 - Search converged, but the result appears to be a singularity.
		This may happen with nonsingular functions if the precision
		demands are set to high.
    DONE
	The name of the variable to receive search completion information.
	Possible values are:
	    0 - Indicates that the number of roots prescribed by MULTI has been
		found without all of RANGE being searched.  This does not
		necesserily mean that there are more roots.  Disabled for 
		MULTI = 1, or negative.
	    1 - Indicates that search has been completed, i.e. all the roots 
		that could be found have been found.
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE:
	Uses Golden section search  for minima of ABS(FUN(X)).  When an 
	interval where F(X) changes sign is identified, uses weighted interval 
	halving to pinpoint the root.
	Uses CAST, DEFAULT, FPU_FIX, ISNUM and TOLER from MIDL.
 MODIFICATION HISTORY:
	Created 15-FEB-92 by Mati Meron.
	Modified 15-APR-92 by Mati Meron.  Added Quadratic Interpolation to 
	speed up convergence for smooth functions.
	Modified 25-JAN-94 by Mati Meron.  Added multi-root search capability.
	Quadratic Interpolation replaced by a weighted halving to increase 
	robustness without loosing speed.
	Modified 5-OCT-1998 by Mati Meron.  Underflow filtering added.

(See /host/bluemoon/usr2/idllib/contrib/meron/root.pro)


SEQLIM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	SEQLIM
 VERSION:
	3.0
 PURPOSE:
	Estimates limits of infinite sequences.
 CATEGORY:
	Mathematical Function (General).
 CALLING SEQUENCE:
	Result = SEQLIM( SVL [, RVL ] [, keywords])
 INPUTS:
    SVL
	Numeric vector containing consecutive terms of the sequence.  At least
	two terms are needed.
 OPTIONAL INPUT PARAMETERS:
    RVL
	Numeric vector, same length as SVL.  Contains estimates of the 
	deviations of the terms of SVL from the limit.  Usually RVL is 
	generated internally, since if good estimates of the deviations from 
	the limit do exist, SEQLIM is not needed.
 KEYWORD PARAMETERS:
    /ZERO_PAD
	Switch.  Used only when RVL is not provided, specifies how a difference
	series is generated from the terms of SVL.  When ZERO_PAD is set, it
	implies a zero term preceding the first term of SVL, i.e. SVL has the
	form of [0,