From 3b7cb5865e942197e1ace41da0b3dc247e1ea633 Mon Sep 17 00:00:00 2001 From: Gregory Ashton <gregory.ashton@ligo.org> Date: Sat, 25 May 2019 16:47:52 +1000 Subject: [PATCH] Revert to previous method of calculating roq frequencies --- bilby/gw/likelihood.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bilby/gw/likelihood.py b/bilby/gw/likelihood.py index c551c69ec..f98c4b366 100644 --- a/bilby/gw/likelihood.py +++ b/bilby/gw/likelihood.py @@ -18,7 +18,8 @@ from scipy.special import i0e from ..core import likelihood from ..core.utils import ( logger, UnsortedInterp2d, BilbyJsonEncoder, decode_bilby_json, - create_time_series, speed_of_light, radius_of_earth) + create_frequency_series, create_time_series, speed_of_light, + radius_of_earth) from ..core.prior import Interped, Prior, Uniform from .detector import InterferometerList from .prior import BBHPriorDict @@ -938,14 +939,14 @@ class ROQGravitationalWaveTransient(GravitationalWaveTransient): if ifo.maximum_frequency > self.roq_params['fhigh']: raise ValueError("Requested maximum frequency larger than ROQ basis fhigh") # Generate frequencies for the ROQ - roq_frequencies = np.arange( - self.roq_params['flow'], - self.roq_params['fhigh'] + 1, - 1 / self.roq_params['seglen']) + roq_frequencies = create_frequency_series( + sampling_frequency=self.roq_params['fhigh'] * 2, + duration=self.roq_params['seglen']) + roq_mask = roq_frequencies >= self.roq_params['flow'] + roq_frequencies = roq_frequencies[roq_mask] overlap_frequencies, ifo_idxs, roq_idxs = np.intersect1d( ifo.frequency_array[ifo.frequency_mask], roq_frequencies, return_indices=True) - else: overlap_frequencies = ifo.frequency_array[ifo.frequency_mask] roq_idxs = np.arange(linear_matrix.shape[0], dtype=int) -- GitLab