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

Allow approximate solutions

parent e87316bc
No related branches found
No related tags found
1 merge request!3Add InstantPulse and InstantGradient pulseq extension support
...@@ -99,12 +99,12 @@ ...@@ -99,12 +99,12 @@
write_sequence(io, seq_orig, format=format) write_sequence(io, seq_orig, format=format)
seek(io, 0) seek(io, 0)
seq_json = read_sequence(io, format=format) seq_json = read_sequence(io, format=format)
@test variables.duration(seq_orig) == variables.duration(seq_json) @test variables.duration(seq_orig) variables.duration(seq_json)
@test length(seq_orig) == length(seq_json) @test length(seq_orig) == length(seq_json)
@test all(variables.duration.(seq_orig) .== variables.duration.(seq_json)) @test all(variables.duration.(seq_orig) . variables.duration.(seq_json))
@test iszero(length(iter_instant_gradients(seq_json))) @test iszero(length(iter_instant_gradients(seq_json)))
@test iszero(length(iter_instant_pulses(seq_json))) @test iszero(length(iter_instant_pulses(seq_json)))
@test all(variables.readout_times(seq_json) .== variables.readout_times(seq_orig)) @test all(variables.readout_times(seq_json) . variables.readout_times(seq_orig))
end end
end end
end end
...@@ -118,12 +118,12 @@ ...@@ -118,12 +118,12 @@
write_sequence(io, seq_orig; format=format) write_sequence(io, seq_orig; format=format)
seek(io, 0) seek(io, 0)
seq_json = read_sequence(io; format=format) seq_json = read_sequence(io; format=format)
@test variables.duration(seq_orig) == variables.duration(seq_json) @test variables.duration(seq_orig) variables.duration(seq_json)
@test length(seq_orig) == length(seq_json) @test length(seq_orig) == length(seq_json)
@test all(variables.duration.(seq_orig) .== variables.duration.(seq_json)) @test all(variables.duration.(seq_orig) . variables.duration.(seq_json))
@test length(iter_instant_gradients(seq_json)) == length(iter_instant_gradients(seq_json)) @test length(iter_instant_gradients(seq_json)) == length(iter_instant_gradients(seq_json))
@test length(iter_instant_pulses(seq_json)) == length(iter_instant_pulses(seq_json)) @test length(iter_instant_pulses(seq_json)) == length(iter_instant_pulses(seq_json))
@test all(variables.readout_times(seq_json) .== variables.readout_times(seq_orig)) @test all(variables.readout_times(seq_json) . variables.readout_times(seq_orig))
end end
end end
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