diff --git a/src/parts/epi_readouts.jl b/src/parts/epi_readouts.jl index f87de0b5cefaac48f8a9125e07f4601933602db6..ed59ff23a5365307bee95ecc31dd2452fec5cf50 100644 --- a/src/parts/epi_readouts.jl +++ b/src/parts/epi_readouts.jl @@ -49,10 +49,10 @@ function EPIReadout(; resolution::AbstractVector{<:Integer}, recenter=false, gro get_free_variable(nothing), ky_lines ) - apply_simple_constraint!(variables.qvec(res.start_gradient), VariableType[-variables.qval(pos)/2, ky_lines[1] * res.ky_step, 0.]) + apply_simple_constraint!(variables.qvec(res.start_gradient), VariableType[-variables.qvec(pos)[1]/2, ky_lines[1] * res.ky_step, 0.]) if recenter sign = isodd(length(ky_lines)) ? -1 : 1 - apply_simple_constraint!(variables.qvec(res.recenter_gradient), VariableType[sign * variables.qval(pos)/2, -ky_lines[end] * res.ky_step, 0.]) + apply_simple_constraint!(variables.qvec(res.recenter_gradient), VariableType[sign * variables.qvec(pos)[1]/2, -ky_lines[end] * res.ky_step, 0.]) end for shift in unique(ky_lines[2:end] - ky_lines[1:end-1]) res.blips[shift] = Trapezoid(orientation=[0, shift > 0 ? 1 : -1, 0], group=group, qval=abs(shift) * res.ky_step)