Sequence.mod_grad_axis#
- Sequence.mod_grad_axis()[source]#
Scale the amplitude of every gradient on
axisbymodifier.- Parameters:
axis ({'x', 'y', 'z'}) – Which axis to act on.
modifier (float) – What to multiply by. -1 inverts the axis, 0 silences it.
- Raises:
ValueError – If
axisis not one of ‘x’, ‘y’ or ‘z’.RuntimeError – If a gradient is played both on
axisand on another, where there is no one answer.
Notes
Only the amplitude moves. The ramps, the delay and the shape stay as they are, so the areas scale with the amplitude and the timing does not change.
Silencing the phase encoding is
mod_grad_axis('y', 0.0); inverting the readout ismod_grad_axis('x', -1.0).Examples
>>> import pypulseqpp as pp >>> seq = pp.Sequence(pp.Opts()) >>> seq.add_block(pp.make_trapezoid("x", area=1000, duration=2e-3)) 1 >>> seq.mod_grad_axis("x", 0.5) >>> seq.get_block(1).gx.area 500.0