From c965f842fbec5b67940c71e10952002871496ccc Mon Sep 17 00:00:00 2001
From: Samson Leong <samson.leong@ligo.org>
Date: Mon, 6 Nov 2023 14:48:41 +0000
Subject: [PATCH] BUGFIX: Fix strain from frame files not resampled

---
 bilby/gw/utils.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bilby/gw/utils.py b/bilby/gw/utils.py
index a825fa5e8..f50b02d98 100644
--- a/bilby/gw/utils.py
+++ b/bilby/gw/utils.py
@@ -423,8 +423,7 @@ def read_frame_file(file_name, start_time, end_time, resample=None, channel=None
 
     if loaded:
         if resample and (strain.sample_rate.value != resample):
-            strain.resample(resample)
-        return strain
+            return strain.resample(resample)
     else:
         logger.warning('No data loaded.')
         return None
-- 
GitLab