int avg (const avg_specs* average_details, int number_of_sets, const float* input_data, int* number_so_far, float* averaged_data) This function averages real or complex data arrays
This function averages real or complex data arrays. Any length of array is supported. Memory space for the data arrays must be allocated by the calling routine. Input and output data is all of type float. For complex input / output, data must be arranged as re part, im part, re part, im part.. until the end of the dataset is reached. The structure avg_complex can help with this. To use the function, the first time you run it, set number_so_far to zero. The structure average_details should contain parameters indicating the type of average and the input data format. if the output data or the input data is complex, space should be allocated for dataset_length * sizeof(avg_complex) at the relevant pointer. Below are definitions of the different average types. AVG_LINEAR_MODULUS. If there are n real / complex elements in each input array, the output for each element is the linear average of the amplitudes of the input elements. For complex input data, the amplitude is the sum in quadrature of the real and complex parts. AVG_EXPON_MODULUS. Same as above, but use an exponential average as defined in 4) below. AVG_LINEAR_VECTOR. For complex input data only. Find an n element array of complex numbers. For the real parts, the elements are the linear average of the real parts of the input data. For the imaginary parts, the output elements are the linear average of the imaginary parts of the input data. AVG_EXPON_VECTOR. Same as above, but take the exponential average as defined in 4) below. AVG_LINEAR_SQUARE. Calulates the root-mean-square rather than a straight average. For complex input data calculates the rms of the modulus. AVG_EXPON_SQUARE. Same as above, but take the exponential average as defined in 4) below.
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++