PolyOrderMaskGenerator#
- class deepinv.physics.generator.PolyOrderMaskGenerator(*args, poly_order=8, **kwargs)[source]#
Bases:
BaseMaskGenerator
Generator for MRI Cartesian acceleration masks using polynomial variable density.
Generates a mask of vertical lines for MRI acceleration with fixed sampling in low frequencies (center of k-space) and polynomial order sampling in the high frequencies.
This is achieved by the following:
Create 1D polynomial function \((1 - r)^{p}\) where \(r\) is the distance from the centre and \(p\) is the polynomial order.
Scale so that its mean matches desired acceleration factor
Use the function as a probability density function (pdf) to sample from a Bernoulli.
The mask is repeated across channels and randomly varies across batch dimension.
Algorithm taken from Millard and Chiew.
- Examples:
>>> from deepinv.physics.generator.mri import PolyOrderMaskGenerator >>> generator = PolyOrderMaskGenerator((2, 128, 128), acceleration=8, center_fraction=0.04, poly_order=8) >>> params = generator.step(batch_size=1) >>> mask = params["mask"] >>> mask.shape torch.Size([1, 2, 128, 128])
For other parameter descriptions see
deepinv.physics.generator.mri.BaseMaskGenerator
- Parameters:
poly_order (int) – polynomial order of the sampling pdf