From 002fec0c8bc67e6ef2a9b29ab26ccfb0a6b6e29c Mon Sep 17 00:00:00 2001 From: Kaze Wong Date: Wed, 3 Jan 2024 16:46:30 -0500 Subject: [PATCH] Add check to make sure heterodyned likelihood frequency grid is correct --- src/jimgw/single_event/likelihood.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jimgw/single_event/likelihood.py b/src/jimgw/single_event/likelihood.py index d6f36195..79907c90 100644 --- a/src/jimgw/single_event/likelihood.py +++ b/src/jimgw/single_event/likelihood.py @@ -192,6 +192,10 @@ def __init__( self.freq_grid_low = self.freq_grid_low[mask_heterodyne_low] self.freq_grid_center = self.freq_grid_center[mask_heterodyne_center] + # Assure frequency grids have same length + if len(self.freq_grid_low) > len(self.freq_grid_center): + self.freq_grid_low = self.freq_grid_low[: len(self.freq_grid_center)] + h_sky_low = self.waveform(self.freq_grid_low, self.ref_params) h_sky_center = self.waveform(self.freq_grid_center, self.ref_params)