spyrit.core.meas.FreeformLinearSplit.adjoint_H
- FreeformLinearSplit.adjoint_H(m: tensor, unvectorize=False)
Apply adjoint of matrix H.
It computes
\[x = H^Tm,\]where \(H \in \mathbb{R}^{M\times N}\) is the acquisition matrix (that may contain negative values), \(m \in \mathbb{R}^M\) is a measurement vector.
Note
The acquisition matrix \(H\) is given by
self.H.- Args:
m(torch.tensor): Measurements \(m\) whose dimensionsself.meas_dimsmust have shapeself.meas_shape.- Returns:
A batch of signals \(x\). If
unvectorizeisFalse, \(x\) has shape \((*, N)\) where \(*\) is the same as form. IfunvectorizeisTrue, \(x\) is reshaped such that the dimensionsself.meas_dimshave shapeself.meas_shape.- Examples:
Example 1: (3, 4) measurements of length 10 are measured with an acquisition matrix of shape (10, 15). This produces (3, 4) signals of length 15.
>>> import spyrit.core.meas as meas >>> H = torch.randn(10, 15) >>> meas_op = meas.LinearSplit(H) >>> m = torch.randn(3, 4, 10) >>> x = meas_op.adjoint_H(m) >>> print(x.shape) torch.Size([3, 4, 15])
Example 2: 3 measurements of length 10 are measured with an acquisition matrix of shape (10, 60). This produces 3 signals of length 60.
>>> import spyrit.core.meas as meas >>> H = torch.randn(10, 60) >>> meas_op = meas.LinearSplit(H, meas_shape=(15, 4)) >>> m = torch.randn(3, 10) >>> x = meas_op.adjoint_H(m) >>> print(x.shape) torch.Size([3, 60])
Using unvectorize=True produces 3 signals of length (15, 4)
>>> x = meas_op.adjoint_H(m, unvectorize=True) >>> print(x.shape) torch.Size([3, 15, 4])