@@ -301,30 +301,32 @@ def calculate_snrs(self, waveform_polarizations, interferometer, return_array=Tr
301301 (self .number_of_response_curves , 1 )
302302 ).T
303303
304- d_inner_h_integrand *= self .calibration_draws [interferometer .name ].T
304+ d_inner_h_integrand [ interferometer . frequency_mask ] *= self .calibration_draws [interferometer .name ].T
305305
306- d_inner_h_array = np .fft .fft (d_inner_h_integrand [0 :- 1 ], axis = 0 ).T
306+ d_inner_h_array = np .fft .fft (d_inner_h_integrand [:- 1 ], axis = 0 ).T
307307
308308 optimal_snr_squared_integrand = np .abs (whitened_signal )** 2
309309 optimal_snr_squared_array = np .dot (
310- optimal_snr_squared_integrand ,
310+ optimal_snr_squared_integrand [ interferometer . frequency_mask ] ,
311311 self .calibration_abs_draws [interferometer .name ].T
312312 )
313313
314314 elif self .time_marginalization and not self .calibration_marginalization :
315- d_inner_h_array = np . fft . fft (
315+ d_inner_h_integrand = (
316316 whitened_signal
317317 * interferometer .whitened_frequency_domain_strain .conjugate ()
318318 )
319+ d_inner_h_array = np .fft .fft (d_inner_h_integrand [:- 1 ])
319320
320321 elif self .calibration_marginalization and ('recalib_index' not in parameters ):
321322 d_inner_h_integrand = (
322323 interferometer .whitened_frequency_domain_strain .conjugate () * whitened_signal
323- )
324+ )[ interferometer . frequency_mask ]
324325 d_inner_h_array = np .dot (d_inner_h_integrand , self .calibration_draws [interferometer .name ].T )
325326
326327 optimal_snr_squared_integrand = np .abs (whitened_signal )** 2
327328 optimal_snr_squared_array = np .dot (
329+ optimal_snr_squared_integrand [interferometer .frequency_mask ],
328330 self .calibration_abs_draws [interferometer .name ].T
329331 )
330332
0 commit comments