spyrit.core.meas.DynamicLinearSplit.forward_H
- DynamicLinearSplit.forward_H(x: tensor) tensor[source]
Simulates the measurement of a motion picture \(y = H \cdot x(t)\).
The output \(y\) is computed as \(y = Hx\), where \(H\) is the measurement matrix and \(x\) is a batch of vectorized (flattened) images. The positive and negative components of the measurement matrix are not used in this method.
The matrix \(H\) can contain positive and negative values and is given by the user at initialization.
- Args:
x: Batch of vectorized (flatten) images of shape \((*, M, N)\) where * denotes the batch size, and \((M, N)\) is the shape of the measurement matrix \(H\).- Shape:
\(x\): \((*, M, N)\)
\(H\) has a shape of \((M, N)\) where \(M\) is the number of measurements and \(N\) is the number of pixels in the image.
\(output\): \((*, M)\)
- Example:
>>> x = torch.rand([10, 400, 1600]) >>> H = torch.rand([400, 1600]) >>> meas_op = LinearDynamicSplit(H) >>> y = meas_op.forward_H(x) >>> print(y.shape) torch.Size([10, 400])