General_functions procedure file contains general utililty functions.
Many user macros use functions from the procedure file using #inlcude "general_functions" statement. It is best to make this file available to Igor by placing a shortcut to the folder containing
General_functions.ipf in User Procedures folder inside Igor program folder.
function clb2pnt(ClbWave, Val)
This function searches ClbWave for a value Val using BinarySearchInterp function. It returns a rounded (integer) position if Val is within the range of values in ClbWave or NaN is such value could not be located.
function clb2val(ValWave, ClbWave, Val)
This function first searches ClbWave for a value Val using BinarySearchInterp function and then uses its position to locate a value in ValWave. It returns an exaxct value within ValWave at the same point at which value in ClbWave is closest to Val. If Val is not within the range of values of ClbWave or the is no such point in ValWave function return NaN.
function pmean(ValWave, pFrom, pTo)
This function calculates an average of values in ValWave from point pFrom to point pTo. It is similar to the built-in function mean except that pmean uses point postition reference rather than scaled calibration as mean does. For default wave scaling both functions are identical.
If either pFrom or pTo extend beyond the range of points in ValWave they are adjusted to 0 or the last point, respectively. If the range from pFrom to pTo does not cover any points in ValWave, paverage returns NaN.
function __(__)
This function ... |