spyrit.core.meas.FreeformLinear.measure

FreeformLinear.measure(x: tensor) tensor[source]

Apply the measurement patterns (no noise) to the incoming tensor.

The mask is first applied to the input tensor, then the input tensor is multiplied by the measurement patterns.

Note

This method does not include the noise model.

Args:

x (torch.tensor): A tensor where the dimensions indexed by self.meas_dims match the measurement shape self.meas_shape.

Returns:

torch.tensor: A tensor of shape (*, self.M) where * denotes all the dimensions of the input tensor not included in self.meas_dims.