Function:

This is a intermediate-level routine which takes as input a pointer to an array containing the swept sine data, and outputs an array of interpolated points suitable for calibration of FFT's of the interferometer output.

The arguments are:

`fri:`Input. Pointer to an array containing swept sine data. The format of this data is`fri[0]=`,`fri[1]=`,`fri[2]=`,`fri[3]=`,`fri[4]=`,`fri[5]=`,... and the total length of the array is`fri[0..frinum-1]`.`frinum:`Input. The number of entries in the array`fri[0..frinum-1]`. If this number is not divisible by three, something is wrong!`num:`Input. The number of points in the FFT that we will be calibrating. This is typically where is an integer. In this case, the number of distinct frequency values at which a calibration is needed is , corresponding to the number of distinct frequency values from (DC) to the Nyquist frequency . See for example equation (12.1.5) of reference [1]. The frequencies are for .`srate:`Input. The sample rate (in Hz) of the data that we are going to be calibrating.`complex:`Input. Pointer to an array`complex[0..s]`where . The routine`calibrate()`fills in this array with interpolated values of the swept sine calibration data, described in the previous section. The real part of the DC response is in`complex[0]`, and the imaginary part is in`complex[1]`. The real/imaginary parts of the response at frequency are in`complex[2]`and`complex[3]`and so on. The last two elements of`complex[ ]`contain the real/imaginary parts of the response at the Nyquist frequency .`method:`Input. This integer sets the type of interpolation used to determine the real and imaginary part of the response, at frequencies that lie in between those given in the swept sine calibration files. Rational function interpolation is used if`method`=0. Polynomial interpolation is used if`method`=1. Spline interpolation with natural boundary conditions (vanishing second derivatives at DC and the Nyquist frequency) is used if`method`=2.`order:`Input. Ignored if spline interpolation is used. If polynomial interpolation is used, then`order`is the order of the interpolating polynomial. If rational function interpolation is used, then the numerator and denominator are both polynomials of order`order`/2 if`order`is even; otherwise the degree of the denominator is (`order`+1)/2 and that of the numerator is (`order`-1)/2.

The basic problem solved by this routine is that the swept sine calibration data in a frame typically contain data at a few hundred distinct frequency values. However to properly calibrate the IFO output, one usually needs this calibration information at a large number of frequencies corresponding to the distinct frequencies associated with the FFT of a data set. This routine allows you to choose different possible interpolation methods. If in doubt, we recommend spline interpolation as the first choice. The interpolation methods are described in detail in Chapter 3 of reference [1].

- Author: Bruce Allen, ballen@dirac.phys.uwm.edu
- Comments: It might be better to interpolate values of times the swept-sine response function, as this is the quantity needed to compute the IFO response function.