Source: cli/stream/rate_calc.pro
rate_calc Calculate a ratio or other combination from streams of the current dataset and add them as new streams. Usage: rate_calc, index1, index2 or: rate_calc, index Arguments: index1 int input The stream index (or a 1-d array of indices) of the numerator streams. If this index is negative, then user the scalar (which must then be given) as the left operand. index2 int input The stream index (or a 1-d array of indices) of the denominator streams. index int input A 2xN array of pairs of stream indices. (or a stream index or 1-d array of indices if the scalar key is present) Keywords: ratio If set, then form the ratio of the 2 streams (default action). difference If set, then form the difference between the streams. product If set, then form the product of the 2 streams. sum If set, then form the sum of the 2 streams power If set, then raise a stream to a power. inverse If set, then form the inverse of the first stream (the second stream is ignored). operation string The symbolic operation to perform. scalar any input If this keyword is present, then the second stream is ignored and the supplied scalar value is used, on the right of the operand. Notes: Only one type of operation can be applied for each invocation. To apply an operation of the form (scalar) (op) (stream), specify the first stream as -1 and give the index as the second stream. Datasets: RATE History: Original: 30/8/00; SJT Extend to allow all the new operations: 29/6/01; SJT Update for new framework: 15/4/02; SJT Renamed: 7/5/02