Skip to content
Snippets Groups Projects
Commit 76484682 authored by Shanika Galaudage's avatar Shanika Galaudage
Browse files

Add check for waveform and frequency array lengths

temporary check added to fail if waveform is longer than the frequency array
parent 074c2926
No related branches found
No related tags found
1 merge request!448Add check for waveform and frequency array lengths
......@@ -262,6 +262,9 @@ def _base_lal_cbc_fd_waveform(
h_plus = np.zeros_like(frequency_array, dtype=np.complex)
h_cross = np.zeros_like(frequency_array, dtype=np.complex)
if len(hplus.data.data) > len(frequency_array):
raise ValueError("Waveform longer than frequency array")
h_plus[:len(hplus.data.data)] = hplus.data.data
h_cross[:len(hcross.data.data)] = hcross.data.data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment