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

Allow for non-integer indices

parent 104b8039
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,7 @@ Computes the area under the curve for the gradient waveform in [`BaseBuildingBlo
If `first_event` is set to something else than `nothing`, only the gradient waveform after this RF pulse/Readout will be considered.
Similarly, if `last_event` is set to something else than `nothing`, only the gradient waveform up to this RF pulse/Readout will be considered.
"""
function qval(bb::BaseBuildingBlock, index1::Union{Nothing, Integer}, index2::Union{Nothing, Integer})
function qval(bb::BaseBuildingBlock, index1, index2)
@assert isnothing(index1) || isnothing(index2) || index2 >= index1
if (index1 isa Number) && (index1 == index2)
return zeros(3)
......@@ -154,7 +154,7 @@ function qval(bb::BaseBuildingBlock, index1::Union{Nothing, Integer}, index2::Un
end
qval(bb::BaseBuildingBlock) = qval(bb, nothing, nothing)
function bmat_gradient(bb::BaseBuildingBlock, qstart, index1::Union{Nothing, Integer}, index2::Union{Nothing, Integer})
function bmat_gradient(bb::BaseBuildingBlock, qstart, index1, index2)
@assert isnothing(index1) || isnothing(index2) || index2 >= index1
if (index1 isa Number) && (index1 == index2)
return zeros(3, 3)
......
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