Isochromats.play#
- Isochromats.play()[source]#
Play one block’s events and return what each coil receives at each ADC sample.
Times are in s from the block’s start. An RF or ADC event plays as The virtual scanner describes; the field and sample times the events amount to can be given instead.
- Parameters:
duration (float) – Block duration, in s.
gradients (sequence, default=None) – Three entries, for the x, y and z axes, each
Noneor a(2, m)array of corner times over gradient amplitude, in Hz/m. The gradient is linear between the corners and zero outside them.rotation (array_like, default=None) –
(3, 3)matrix from the axesgradientsare given along to the axes of the positions, a reflection allowed. Each axis plays the sum its row weights, exact on the union of the corners, with a gradient’s step from or to zero at its first or last corner kept as a step.rf (RF event or tuple, default=None) – An RF event:
signal, in Hz, at the timestfrom the pulse’s start, which isdelayinto the block, with its phase and frequency offsets; a dynamic pTx pulse holds its channels one after another over one time base. Or the transverse fieldb1, as(start, step, samples):(steps,)or(channels, steps)complex samples, in Hz, each held forstepfromstarton. Without transmit sensitivities the channels are summed; with them there must be one channel each.adc (ADC event or array_like, default=None) – An ADC event, sampled at the middle of each dwell from its delay on, whose samples are returned demodulated by its phase offset, frequency offset and phase modulation. Or increasing sample times, whose samples are returned as received. No sample may fall inside the RF pulse.
system (Opts, default=None) – The RF raster, over whose steps an RF event with a time shape is held, and the gamma and B0 the events’ ppm offsets are resolved at; the default system when None.
tolerance (float, default=0.0) – Above zero, an ADC window read by a transform is read to within it, relative to the sum of the magnitudes of the terms each sample sums.
- Returns:
(coils, samples): at each sample, the sum over the isochromats of the receive sensitivity timesMx + i My, demodulated for an ADC event.- Return type:
NDArray[np.complex128]
- Raises:
ValueError – If an event does not fit in the block, an ADC sample falls inside the RF pulse, the RF channels do not match the transmit sensitivities, or an event or the rotation is malformed.
Examples
>>> import numpy as np >>> import pypulseqpp as pp >>> from pulserver.virtual import Isochromats >>> spins = Isochromats([[0.0, 0.0, 0.0]]) >>> rf = pp.make_block_pulse(np.pi / 2, duration=1e-3) >>> adc = pp.make_adc(1, dwell=10e-6, delay=1e-3) >>> np.round(spins.play(1.01e-3, rf=rf, adc=adc), 6) array([[0.+1.j]])