Path: blob/main/Group exercises/Group Exercise 2.ipynb
968 views
Group exercise 2: Binary Compact Objects
Let us consider a binary system of two compact objects, such as neutron stars or black holes. We assume them to be point-like and their orbit to be circular. The objects have the masses and .
A certain combination of the objects' masses is the so-called chirp mass.
The chirp mass is related to the frequency of gravitational waves that are emitted by the binary system. Over time, the emission of gravitational waves leads to a loss of energy, which results in the objects inspiraling and finally merging. At the same time, the frequency of the gravitational waves increases.
The time derivative of the frequency can be written as
where is the gravitational constant and the speed of light.
Exercise Goals
Use the data given below from a gravitational wave signal, which includes arrays for the time and amplitude of the GWs. Compute the gravitational wave frequency at more than one thousand points and compute the derivative of the frequency with respect to time numerically. Lastly, determine the chirp mass using the frequency and its derivative.
Detailed instructions follow the code block below.
Step 1
First, we have to find maxima of the array 'h_plus' and store them in a new array 'max_h' (the frequency can then be derived as the difference between two maxima). Keep in mind that it might be useful to also extract the time at the maximum from the array 't' and store it in another array 'time_at_max'.
Step 2
Create an array for the frequencies 'freq'. Compute this by noting that a period is given by the difference between two maxima (two consecutive data points in the array created before). At the same time, create a new array 'time' for the time and append the mean value of the two points in time that belong to the maxima.
Step 3
Calculate the numerical derivative of the frequency using np.gradient(freq,time) and store the result in a new array 'deriv_freq'.
Step 4
Define a function that calculates the chirp mass from the input parameters 'frequency' and 'frequency derivative'.
Step 5
Loop over all pairs of (frequency, frequency derivative) to calculate the respective values for the chirp mass. Store the results in an array. Calculate the final result for the chirp mass as the mean value of the before created array.
Note: Similar to what was encountered in the first python exercise, if you supply numpy arrays to the chirp_mass function, you may not need to use a loop.