spyrit.misc.sampling.img2mask
- spyrit.misc.sampling.img2mask(Mat: ndarray, M: int)[source]
Returns sampling mask from sampling matrix.
- Args:
- Mat (np.ndarray):
N-by-N sampling matrix, where high values indicate high significance.
- M (int):
Number of measurements to be kept.
- Returns:
- Mask (np.ndarray):
N-by-N sampling mask, where 1 indicates the measurements to sample and 0 that to discard.