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

Minimise readout duration by default

parent b8d9d575
No related branches found
No related tags found
1 merge request!5Resolve "Allow slice selection"
...@@ -2,7 +2,7 @@ module EPIReadouts ...@@ -2,7 +2,7 @@ module EPIReadouts
import ...Containers: BaseSequence, get_index_single_TR import ...Containers: BaseSequence, get_index_single_TR
import ..Trapezoids: Trapezoid, opposite_kspace_lines, LineReadout import ..Trapezoids: Trapezoid, opposite_kspace_lines, LineReadout
import ...Components: ADC import ...Components: ADC
import ...Variables: get_free_variable, VariableType, set_simple_constraints!, get_readout, apply_simple_constraint!, variables, @defvar import ...Variables: get_free_variable, VariableType, set_simple_constraints!, get_readout, apply_simple_constraint!, variables, @defvar, add_cost_function!
import ...Pathways: PathwayWalker, update_walker_till_time!, walk_pathway! import ...Pathways: PathwayWalker, update_walker_till_time!, walk_pathway!
""" """
...@@ -58,6 +58,12 @@ function EPIReadout(; resolution::AbstractVector{<:Integer}, recenter=false, gro ...@@ -58,6 +58,12 @@ function EPIReadout(; resolution::AbstractVector{<:Integer}, recenter=false, gro
res.blips[shift] = Trapezoid(qvec=[0., shift * res.ky_step, 0.], group=group) res.blips[shift] = Trapezoid(qvec=[0., shift * res.ky_step, 0.], group=group)
end end
set_simple_constraints!(res, vars) set_simple_constraints!(res, vars)
add_cost_function!(sum(variables.duration.([
res.start_gradient,
res.positive_line,
res.negative_line,
values(res.blips)...,
])))
return res return res
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