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

Fix calling of readout

parent f62455ce
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ import StaticArrays: SVector
import JuMP: @constraint
import ...Variables: get_free_variable, TR, VariableType, duration, variables, VariableNotAvailable, Variables, set_simple_constraints!
import ...BuildSequences: global_model
import ...Components: EventComponent
import ...Components: EventComponent, NoGradient
import ..Abstract: ContainerBlock, start_time
import ..BuildingBlocks: Wait, BuildingBlock, BaseBuildingBlock
......@@ -127,6 +127,6 @@ Converst object into something that can be included in the sequence:
to_block(cb::ContainerBlock) = cb
to_block(s::Symbol) = to_block(Val(s))
to_block(s::Union{VariableType, Nothing, Val{:min}, Val{:max}}) = Wait(s)
to_block(ec::EventComponent) = BuildingBlock([], [(0, ec)]; duration=duration(ec))
to_block(ec::EventComponent) = BuildingBlock([NoGradient(duration(ec))], [(1, ec)])
end
......@@ -32,7 +32,7 @@ struct EPIReadout{N} <: BaseSequence{N}
ky_lines :: AbstractVector{<:Integer}
end
function EPIReadout(resolution::AbstractVector{<:Integer}; recenter=false, group=:FOV, ky_lines=nothing, variables...)
function EPIReadout(; resolution::AbstractVector{<:Integer}, recenter=false, group=:FOV, ky_lines=nothing, variables...)
if length(resolution) != 2
error("EPIReadout expects the image resolution in the x- and y-direction.")
end
......
......@@ -154,7 +154,7 @@ function readout_event(; type, optimise=false, scanner=nothing, variables...)
if !(type in keys(func_dict))
error("Readout event type `$type` has not been implemented. Please use one of $(keys(func_dict)).")
end
return func_dict[type](real_variables...)
return func_dict[type](; real_variables...)
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