FourierPlayer

Contents

FourierPlayer#

class pulserver.virtual.FourierPlayer[source]#

Bases: object

The blocks the cache beside a sequence file plays, acquired of a phantom’s tissue by the Fourier engine.

A pulse turns an entry through its flip angle on resonance times the magnitude of the transmit field the entry sees, with the pulse’s profile at the field the entry sees during it, about its axis turned as a pulse phase of minus the transmit field’s phase turns it. A pulse under a gradient that changes along one axis, as a spectral-spatial pulse, has its profile across the field and the position along that axis, simulated over those the entries span. Between events, the net gradient moment across a voxel shifts the configuration states by one order where it dephases by at least SHIFT_CYCLES cycles along the axes the tissue spans; its part that changes from one repetition to the next counts where the intervals between two pulses do not cancel it, and anything less is taken as balanced.

Entries a pulse turns alike form a group, and the groups an excitation turns form a station. A station’s signals are simulated by blochsim’s extended phase graphs, a train per group, over each class of tissue, bin of the field and bin of the transmit field the entries interpolate between, and spanned by a temporal basis at each readout’s echo, the sample nearest the centre of k-space. Across a readout, each entry decays with its T2 from the echo, dephases with its T2’ over the time the magnetization has gone unrefocused, and precesses at its frequency from the echo; a basis of the samples’ times spans this. The station’s readouts encode one image per pair of terms, on a grid along the logical axes the trajectory encodes, at the resolution its widest k reaches, over the entries it excites, each entry a cube of uniform magnetization. Each image times each coil’s sensitivity is transformed to the samples by bartorch’s NUFFT.

Parameters:
  • seq_path (Path | str) – The first file of the sequence’s chain, beside its cache.

  • tissue (Tissue) – The phantom’s tissue.

  • cache_ext (str, default='.pseg') – The extension of the cache beside each file.

  • rotation (np.ndarray, default=None) – (3, 3) rotation of the prescription from logical to physical axes; the identity by default.

  • centre (np.ndarray, default=None) – (3,) the prescription’s centre along the physical axes, in m; the isocentre by default. Pulse and receiver phases are taken in the frame of this centre.

  • device (torch.device | str, default=None) – Where the simulation runs; a card where there is one by default.

  • tolerance (float, default=TOLERANCE) – Relative residual to which the temporal and readout bases span the signals; TOLERANCE by default.

  • motion (RigidMotion, default=None) – How the subject moves, at each readout’s echo; it moves its encoding alone, its excitation, relaxation and coil sensitivities following it.

  • girf (Girf, default=None) – The impulse response the gradients play through.

Attributes:

played – The playout’s blocks, as pulserver.ir.playout() records them.

Methods

boundary

Return the first block from block on at which a span of the scan may end.

readouts

Yield each readout of the blocks from first to before last: (coils, samples) complex64, demodulated.

Attributes

blocks

Blocks in the scan.