From 1d177ebe26b0be304db4b0c51b500b149bd423cd Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Mon, 8 Apr 2024 14:37:11 +0100
Subject: [PATCH] Fix returning RF pulse amplitude and phase

---
 src/containers/building_blocks.jl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/containers/building_blocks.jl b/src/containers/building_blocks.jl
index 7867af5..43b21f5 100644
--- a/src/containers/building_blocks.jl
+++ b/src/containers/building_blocks.jl
@@ -223,7 +223,7 @@ end
 for (fn, default_value) in ((:amplitude, 0.), (:phase, NaN))
     @eval function $fn(bb::BaseBuildingBlock, time::Number)
         for (key, block) in events(bb)
-            if block isa RFPulseComponent && start_time(bb, key) >= time >= end_time(bb, key)
+            if block isa RFPulseComponent && start_time(bb, key) <= time <= end_time(bb, key)
                 return $fn(block, time - start_time(bb, key))
             end
         end
-- 
GitLab