next up previous contents
Next: Function: reciprocal() Up: GRASP Routines: General purpose Previous: Function: productc()   Contents

Function: ratio()

0 void ratio(float *c,float *a, float *b,int ncomplex) This routine takes as input a pair of arrays $a$ and $b$ containing complex numbers. It divides $a$ by $b$, placing the result in $c$, so that $c = a /b$. The arguments are:
a: Input. An array of $N$ complex numbers a[0..2N-1] with a[2j] and a[2j+1] respectively containing the real and imaginary parts.
b: Input. An array of $N$ complex numbers b[0..2N-1] with b[2j] and b[2j+1] respectively containing the real and imaginary parts.
c: Output. The array of $N$ complex numbers c[0..2N-1] with c[2j] and c[2j+1] respectively containing the real and imaginary parts of $a /b$.
ncomplex: Input. The number $N$ of complex numbers in the arrays.
Note that the two input arrays a[ ] and b[ ] can be the same array; or the output array c[ ] can be the same as either or both of the inputs. For example, the following are all valid:
ratio(c,a,a,n), which (very inefficiently) sets every element of $c$ to $1+0i$.
ratio(a,a,b,n), which performs the operation $a / b\rightarrow a$.
ratio(a,b,a,n), which performs the operation $b/a \rightarrow a$.
ratio(a,a,a,n), which (very inefficiently) sets every element of $a$ to $1+0i$.

This routine is particularly useful when you want to reconstruct the raw interferometer output $\widetilde{C_0}(f)$ that would have produced a particular interferometer displacement $\widetilde{\Delta l}(f)$ (see for example normalize_gw() in Section [*]). This occurs for example if you are ``injecting" chirps into the raw interferometer output; they first need to be deconvolved with the response function of the instrument. One can invert this equation using ratio() since $\widetilde{\Delta l}(f) = R(f)
\widetilde{C_0}(f) \Rightarrow
\widetilde{C_0}(f) = \widetilde{\Delta l}(f)/R(f)$.

Author: Bruce Allen, ballen@dirac.phys.uwm.edu
Comments: None.


next up previous contents
Next: Function: reciprocal() Up: GRASP Routines: General purpose Previous: Function: productc()   Contents
Bruce Allen 2000-11-19