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

By default oversample with a factor of 2

parent 4bc29225
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ Adds a readout event to the sequence.
- `optimise`: Whether to optimise this readout event in isolation from the rest of the sequence. Use this with caution. It can speed up the optimisation (and for very complicated sequences make it more robust), however the resulting parameters might not represent the optimal solution of any external constraints (which are ignored if the readout is optimised in isolation).
- `scanner`: Used for testing. Do not set this parameter at this level (instead set it for the total sequence using [`build_sequence`](@ref)).
"""
function readout_event(; type=nothing, optimise=false, scanner=nothing, all_variables...)
function readout_event(; type=nothing, optimise=false, scanner=nothing, oversample=2, all_variables...)
real_variables = Dict(key => value for (key, value) in pairs(all_variables) if !(isnothing(value) || (value isa AbstractVector && all(isnothing.(value)))))
if isnothing(type)
resolution = get(real_variables, :resolution, nothing)
......@@ -149,6 +149,7 @@ function readout_event(; type=nothing, optimise=false, scanner=nothing, all_vari
end
if type == :instant
optimise = false # there is nothing to optimise
oversample = nothing
end
build_sequence(scanner; optimise=optimise) do
func_dict = Dict(
......@@ -158,7 +159,7 @@ function readout_event(; type=nothing, optimise=false, scanner=nothing, all_vari
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](; oversample=oversample, 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