From 360c6362b0079b7474b10e66bf743bc75360170e Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <MichielCottaar@protonmail.com>
Date: Wed, 6 Nov 2024 14:19:31 +0000
Subject: [PATCH] BF: fix setting of phase for sinc pulse

---
 src/components/pulses/sinc_pulses.jl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/pulses/sinc_pulses.jl b/src/components/pulses/sinc_pulses.jl
index 7d598fd..658140b 100644
--- a/src/components/pulses/sinc_pulses.jl
+++ b/src/components/pulses/sinc_pulses.jl
@@ -134,7 +134,7 @@ function make_generic(block::SincPulse)
     normed_times = -variables.N_left(block):0.1:variables.N_right(block) + 1e-5
     times = max.(0., (normed_times .+ variables.N_left(block))) .* variables.lobe_duration(block)
     amplitudes = variables.amplitude(block) .* (normalised_function.(normed_times, variables.N_left(block), variables.N_right(block); apodise=block.apodise))
-    phases = [variables.frequency(block) .* variables.lobe_duration(block)] .* normed_times .* 360
+    phases = [variables.frequency(block) .* variables.lobe_duration(block)] .* normed_times .* 360 .+ variables.phase(block)
     return GenericPulse(times, amplitudes, phases, variables.effective_time(block))
 end
 
-- 
GitLab