tools.ccapply_readout

tools.ccapply_readout#

bartorch.tools.ccapply_readout()#

Virtual channels of one readout under an SVD compression, as ccapply -S gives them.

An SVD compression is one matrix for all of k-space, so a readout streamed on its own is projected by it directly, without a call into BART: the virtual channel j is sum_c conj(matrix[j, c]) readout[c].

Parameters:
  • readout (torch.Tensor) – (channels, ...) samples, the channels first.

  • matrix (torch.Tensor) – The compression matrix of cc() with S=True, (channels, channels) or (channels, channels, 1, 1, 1).

  • p (int) – Virtual channels kept.

Returns:

(p, ...), in the dtype of readout.

Return type:

torch.Tensor

Raises:

ValueError – If readout and matrix differ in channels, or p is not between 1 and the channels.