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

Print in order of ID

parent 0ee3166c
No related branches found
No related tags found
1 merge request!1Add writing to Pulseq files
Pipeline #23987 failed
......@@ -19,7 +19,8 @@ end
function gen_section(comp:: PulseqComponents, ::Val{:adc})
res = PulseqSection{:adc}(String[])
for (i, adc) in comp.adc
for i in sort([keys(comp.adc)...])
adc = comp.adc[i]
values = string.(Any[
i,
adc.num,
......
......@@ -27,7 +27,8 @@ end
function gen_section(comp:: PulseqComponents, ::Val{:gradients})
res = PulseqSection{:gradients}(String[])
for (i, grad) in comp.grads
for i in sort([keys(comp.grads)...])
grad = comp.grads[i]
if !(grad isa PulseqGradient)
continue
end
......
......@@ -30,7 +30,8 @@ end
function gen_section(comp:: PulseqComponents, ::Val{:rf})
res = PulseqSection{:rf}(String[])
for (i, pulse) in comp.pulses
for i in sort([keys(comp.pulses)...])
pulse = comp.pulses[i]
values = string.(Any[
i,
pulse.amplitude,
......
......@@ -59,7 +59,8 @@ end
function gen_section(comp:: PulseqComponents, ::Val{:shapes})
res = PulseqSection{:shapes}(String[])
for (index, shape) in comp.shapes
for index in sort([keys(comp.shapes)...])
shape = comp.shapes[index]
append!(res.content, [
"",
"shape_id $index",
......
......@@ -19,7 +19,8 @@ end
function gen_section(comp:: PulseqComponents, ::Val{:trap})
res = PulseqSection{:trap}(String[])
for (i, grad) in comp.grads
for i in sort([keys(comp.grads)...])
grad = comp.grads[i]
if !(grad isa PulseqTrapezoid)
continue
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