From bd9e1e1282d1200ee1c920869fffc9988f18de99 Mon Sep 17 00:00:00 2001
From: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Date: Mon, 8 Apr 2024 14:10:13 +0100
Subject: [PATCH] Fix loading blocks with time ID

---
 src/sequence_io/pulseq.jl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/sequence_io/pulseq.jl b/src/sequence_io/pulseq.jl
index 80d6b4b..556c786 100644
--- a/src/sequence_io/pulseq.jl
+++ b/src/sequence_io/pulseq.jl
@@ -234,10 +234,12 @@ function build_sequence(; scanner=nothing, B0=3., TR=nothing, definitions, versi
                 phase_size = rad2deg.(phase_shape) .+ phase_times .* (proc.freq * 1e-3 * 360) .+ rad2deg(proc.phase)
             end
             if version != v"1.3.1" && !iszero(proc.time_id)
-                (num, time_shape) = shapes[proc.time_id]
-                times = time_shape.amplitudes .* rf_raster
+                @show shapes
+                (num, _, time_shape) = shapes[proc.time_id]
+                times = time_shape .* rf_raster
                 ampl = ampl_size
                 phase = phase_size
+                @assert length(times) == length(ampl) == length(phase)
             else
                 (times, ampl, phase) = align_in_time((ampl_times, ampl_size), (phase_times, phase_size))
             end
-- 
GitLab