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

Use known qvec orientation

parent 01762bcc
No related branches found
No related tags found
1 merge request!2Define variables through new @defvar macro
......@@ -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)
......
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