spyrit.misc.sampling.meas2img

spyrit.misc.sampling.meas2img(meas: ndarray, Mat: ndarray) ndarray[source]

Returns measurement image from a single measurement vector or from a batch of measurement vectors. 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 : np.ndarray with shape \((M)\) or \((B, M)\) where \(B\) is the batch size and \(M\) is the length of the measurement vector.

Mat : np.ndarray with shape \((N,N)\). Sampling matrix, where high values indicate high significance. It must be the matrix used to generate the measurement vector.

Returns:

Img : np.ndarray with shape \((N,N,)\). N-by-N measurement image