CompressChannels

Contents

CompressChannels#

class pulserver.recon.CompressChannels[source]#

Bases: Gadget

Project the receive channels of each readout onto n_virtual virtual channels as it arrives.

The calibration readouts (REF or IMA) that lead a scan are held until the first readout that is not one: the basis is the eigenvectors of the channel covariance of every sample of the held readouts of the first contrast, of all of them where none is of the first contrast (bartorch.tools.cc()), of which the n_virtual with the largest eigenvalues are kept. It is stored in context.coil_compression, so the maps coil_maps() estimates record it. The held readouts are then given on, projected, ahead of that readout, and every later readout is projected as it arrives, so a buffer holds n_virtual channels. Readouts held when the stream ends are given on by release().

A stream whose first readout is not a calibration readout, or whose readouts have no more than n_virtual channels, passes unchanged, as do navigator and noise readouts. Place the gadget after Prewhiten, so the basis is that of whitened channels, and before any gadget that changes the header of a readout: a held readout is given on with its acquisition as this gadget received it.

Corresponds to Gadgetron’s PCACoilGadget and CoilReductionGadget.

Parameters:

n_virtual (int) – Virtual channels kept.

Methods

release

Return the readouts held, projected onto the basis they give, in the order they arrived.

startup

Prepare for one stream; the default stores context, so overrides call it.