Skip to content
Snippets Groups Projects
Unverified Commit 27bd8553 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Check uncompressing of shape

parent 98c4258c
No related branches found
No related tags found
1 merge request!1Add writing to Pulseq files
...@@ -46,9 +46,14 @@ function uncompress(compressed::CompressedPulseqShape) ...@@ -46,9 +46,14 @@ function uncompress(compressed::CompressedPulseqShape)
push!(amplitudes, sample) push!(amplitudes, sample)
if sample == prev_sample if sample == prev_sample
repeating = true repeating = true
else
prev_sample = sample
end end
end end
end end
if length(amplitudes) != compressed.num
error("Uncompressing shape did not produce correct number of elements.")
end
return PulseqShape(amplitudes) return PulseqShape(amplitudes)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment