next up previous contents
Next: Function: calculate_testmass_phase() Up: GRASP Routines: Waveforms from Previous: Chirp generation for test   Contents

Function: testmass_chirp()

0 int testmass_chirp(float m1, float m2, float theta, float phi, float *Phase, float f_start, float f_end, float *f_started, float *f_ended, float dt, float **hplus, float **hcross, float **frequency, int *number_of_points, int MaxL, int *modes)
This function calculates the two unnormalized signals $h_+$ and $h_\times$. To normalize just multiply the output by the prefactor $2 \mu/r$. This is the main routine of the test mass package. The arguments are:
m1: Input. The mass of the first body in units of the solar mass.
m2: Input. The mass of the second body in units of the solar mass.
theta: Input. The inclination angle $\vartheta$ in radians.
phi: Input. The azimuth $\varphi$ in radians.
Phase: Input: A pointer to an array containing the phase function $\Phi(f_0,v)$. The number of points calculated must have been set beforehand, either by the supplied routines or through an explicit call of Set_Up_Data().
f_start: Input. Starting orbital frequency in Hertz. If the frequency is too low it will be adjusted to the minimum allowed frequency.
f_end: Input. Final orbital frequency in Hertz. If set too high the program will terminate at the maximum frequency.
f_started: Output. The frequency in Hertz where the chirp actually started. This is max $(f_{\rm start}, v_{\rm min}^3 c^3/(2 \pi G M))$.
f_ended: Output. The frequency in Hertz where the chirp terminated. This is min $(f_{\rm end}, v_{\rm max}^3 c^3/(2 \pi G M))$
dt: Input. The time interval between successive samples in seconds.
hplus: Input/Output. The signal $h_+$ is stored in the array *hplus[0..number_of_points-1]. If **hplus == NULL memory will be allocated, otherwise the user has to provide the memory. The allocated memory is given by ((number_of_points/kNumberOfFloats +1)*kNumberOfFloats*sizeof(floats). Note that this performs integer arithmetic, so it's not what you might expect.
hcross: Input/Output. The signal $h_\times$ is stored in the array *hcross[0..number_of_points-1]. If **hcross == NULL memory will be allocated, otherwise the user has to provide the memory. Use the same expression as above to get the memory allocated.
frequency: Input/Output. The orbital frequency $f(t)$ is stored in the array *frequency[0..number_of_points-1]. If **frequency == NULL memory will be allocated, otherwise the user has to provide the memory.
number_of_points: Input/Output. The number of points requested. If number_of_points == 0 then memory will be allocated for you. If number_of_points is nonzero, then at most this number of points will be returned. You must give the number of points if you allocated memory for any of the arrays hplus, hcross or frequency yourself. On exit this variable holds the actual number of points calculated.
MaxL: Input. The maximum number of modes to be used. For the supplied data file this has to be less than or equal to five. It is assumed that all $m$'s are available for a given $l$.
modes: Input. An array containing a list of modes to include in the sum ([*]). The array contains $1$'s for modes to be included and $0$'s otherwise. The sequence of modes is
index 0 1 2 3 4 5 6 7 8 9 10 11 ...
l 2 2 2 2 3 3 3 3 3 3 4 4 ...
m -2 -1 +1 +2 -3 -2 -1 +1 +2 +3 -4 -3 ...

Use the macro
#define mode2(l,m) ((l)*(l) + m - 2 - ((m > 0) ? 1 : 0)) to calculate the index.

Return value: Output. testmass_chirp() returns $0$ if there was no error, and an error code otherwise. These codes are described in Section [*].

Author: Serge Droz, droz@physics.uoguelph.ca
Comments: As was mentioned above, you will get an error if the required data files are not read into memory. See Section [*] for a detailed description of the errors.


next up previous contents
Next: Function: calculate_testmass_phase() Up: GRASP Routines: Waveforms from Previous: Chirp generation for test   Contents
Bruce Allen 2000-11-19