Skip to content
Snippets Groups Projects
Commit 2dac5822 authored by Moritz Huebner's avatar Moritz Huebner
Browse files

Merge branch 'patch-1' into 'master'

Add check for waveform and frequency array lengths

See merge request !448
parents 074c2926 76484682
No related branches found
No related tags found
1 merge request!448Add check for waveform and frequency array lengths
Pipeline #58596 passed
......@@ -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