-
Notifications
You must be signed in to change notification settings - Fork 364
Description
When calculating the mismatch between waves, discontinuities in the match value can occur when using pycbc.filter.matchedfilter.optimized_match that are not present when using match. Specifically, the research I'm doing is investigating lensed vs unlensed waves and certain combinations of chirp mass and time delay cause a spike in the mismatch (1-match). An example is shown in the following graph:
This is not an isolated issue, it occurs in multiple regions of phase-space, as seen by the sharp red-orange regions in the following contour plot:
Or zoomed-in:
Here's a link to a pkl file containing the waveform strain for the range of waves from the first plot for testing purposes. Usage is as follows:
with open('data.pkl', 'rb') as file:
td_list, lensed_waveform_list, unlensed_waveform_list = pickle.load(file)
Each item in lensed_waveform_list
and unlensed_waveform_list
is a FrequencySeries object of the strain of the wave. The PSD is calculated using the following function:
def Sn(f_arr, f_min=20, delta_f=0.25, frequencySeries=True):
"""
Calculates the power spectral density of the aLIGO noise curve based on arXiv:0903.0338.
Parameters
----------
f_arr : np.ndarray
The frequency array.
f_min : float, optional
The minimum frequency. Defaults to 20 Hz.
delta_f : float, optional
The frequency step size. Defaults to 0.25 Hz.
frequencySeries : bool, optional
If True, returns a FrequencySeries object. Defaults to True.
Returns
-------
np.ndarray or FrequencySeries
The power spectral density of the aLIGO noise curve.
"""
Sn_val = np.zeros_like(f_arr)
for i in range(len(f_arr)):
if f_arr[i] < f_min:
Sn_val[i] = np.inf
else:
S0 = 1e-49
f0 = 215
Sn_temp = (
np.power(f_arr[i] / f0, -4.14)
- 5 * np.power(f_arr[i] / f0, -2)
+ 111
* (
(1 - np.power(f_arr[i] / f0, 2) + 0.5 * np.power(f_arr[i] / f0, 4))
/ (1 + 0.5 * np.power(f_arr[i] / f0, 2))
)
)
Sn_val[i] = Sn_temp * S0
if frequencySeries:
return FrequencySeries(Sn_val, delta_f=delta_f)
return Sn_val