Events#
- class mrsd.Event(duration, amplitude, begin=None, end=None, center=None, offset=None, **kwargs)#
Abstract sequence event
- Parameters:
duration – total duration.
amplitude – normalized amplitude between -1 and +1.
begin,end,center – time of the begin, end, or center of the event. Only one must be specified.
offset – horizontal and vertical offset to position the event.
kwargs – passed to matplotlib.patches.Patch
- move(offset)#
Move on the time axis, return the object
ADC#
- class mrsd.ADC(duration, **kwargs)#
ADC/readout event, represented by a rectangle of amplitude 1.
Echo#
- class mrsd.Echo(duration, amplitude=1, **kwargs)#
Echo event, represented by an oscillating exponential.
Gradient#
- class mrsd.Gradient(flat_top, amplitude, ramp=0, **kwargs)#
Gradient event, represented by a trapezoid.
- Parameters:
flat_top – duration of the gradient flat-top
amplitude – amplitude of the gradient flat-top
ramp,ramp_up,ramp_down – ramp durations of the gradient. Use ramp for symmetric gradients, and both ramp_up and ramp_down for asymmetric gradients
- adapt(flat_top, area_factor, ramp=0, ramp_up=None, ramp_down=None, **kwargs)#
Return a gradient with an area equal to a factor of the current gradient.
Multi-Gradient#
- class mrsd.MultiGradient(flat_top, amplitude, ramp=0, steps=5, **kwargs)#
Multiple gradient events (e.g. phase encoding), represented by nested trapezoids.
- Parameters:
flat_top – duration of the gradient flat-top
amplitude – maximum amplitude of the gradient flat-top
ramp,ramp_up,ramp_down – ramp durations of the gradient. Use ramp for symmetric gradients, and both ramp_up and ramp_down for asymmetric gradients
steps – number of steps drawn between the maximum and minimum amplitude
RF Pulse#
- class mrsd.RFPulse(duration, amplitude, envelope=<function sinc_envelope>, **kwargs)#
RF pulse event, represented by a user-defined envelope
- Parameters:
duration – duration of the pulse
amplitude – maximum amplitude
envelope – sinc_envelope (default), box_envelope, or gaussian_envelope
lobes – number of lobes on each side of a sinc envelope (defaults to 3)
apodization – apodization of a sinc envelope (None (default), “hann”, or “hamming”)
sd – standard deviation of a Gaussian envelope (defaults to 0.3)
points – number of points used to draw the envelope (defaults to 101)