spyrit.core.torch.meas2img
- spyrit.core.torch.meas2img(meas: tensor, Ord: tensor) tensor[source]
Returns measurement image from a single measurement tensor or from a batch of measurement tensors.
This function is particulatly useful if the number of measurements is less than the number of pixels in the image, i.e. the image is undersampled.
- Args:
meas : torch.tensor with shape \((*, M)\) where \(*\) is any dimension (e.g. the batch size, channel, etc) and \(M\) is the length of the measurement vector.
Ord : torch.tensor with shape \((N,N)\). Sampling order matrix, where high values indicate high significance. This matrix determines the order of the measurements. It must be the matrix used when generating the measurement vector.
- Returns:
Img : torch.tensor with shape \((*, N,N)\). batch of N-by-N measurement images.