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 particularly useful when the number of measurements is less than the number of pixels in the image, i.e., for undersampled acquisition.
- Args:
meas(torch.tensor): Measurement vector 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): Sampling map with shape \((N,N)\), where high values indicate high significance. The sampling map determines the order of the measurements. It must be the same sampling as that used for generating the measurement vector.- Returns:
torch.tensorwith shape \((*, N,N)\). batch of N-by-N measurement images.