From 540aede8885f5767a790e61b445c232b0cff5b13 Mon Sep 17 00:00:00 2001 From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk> Date: Fri, 12 Apr 2024 16:04:28 +0100 Subject: [PATCH] Use apodisation when computing amplitude --- 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 e5d43bb..99dfb53 100644 --- a/src/components/pulses/sinc_pulses.jl +++ b/src/components/pulses/sinc_pulses.jl @@ -90,7 +90,7 @@ lobe_duration(pulse::SincPulse) = pulse.lobe_duration inverse_bandwidth(pulse::SincPulse) = lobe_duration(pulse) effective_time(pulse::SincPulse) = N_left(pulse) * lobe_duration(pulse) -amplitude(pulse::SincPulse, time::Number) = amplitude(pulse) * normalised_function(abs((time - effective_time(pulse))) / lobe_duration(pulse), N_left(pulse), N_right(pulse)) +amplitude(pulse::SincPulse, time::Number) = amplitude(pulse) * normalised_function(abs((time - effective_time(pulse))) / lobe_duration(pulse), N_left(pulse), N_right(pulse); apodise=pulse.apodise) phase(pulse::SincPulse, time::Number) = phase(pulse) + frequency(pulse) * (time - effective_time(pulse)) function make_generic(block::SincPulse) -- GitLab