MRIStackedNUFFTGPU#
- class mrinufft.operators.stacked.MRIStackedNUFFTGPU(samples, shape, smaps=None, n_coils=1, n_batchs=1, n_trans=1, z_index='auto', squeeze_dims=False, smaps_cached=False, density=False, backend='cufinufft', **kwargs)[source]#
Bases:
MRIStackedNUFFTStacked NUFFT Operator for MRI using GPU only backend.
This requires cufinufft to be installed.
- Parameters:
samples (array-like) – Sample locations in a 2D kspace
shape (tuple) – Shape of the image.
z_index (array-like) – Cartesian z index of masked plan. if “auto” the z_index is computed from the samples, if they are 3D, using the last coordinate.
smaps (array-like) – Sensitivity maps.
n_coils (int) – Number of coils.
n_batchs (int) – Number of batchs.
**kwargs (dict) – Additional arguments to pass to the backend.
Methods
__init__Adjoint operator.
cgConjugate Gradient method to solve the inverse problem.
check_shapeValidate the shapes of the image or k-space data against operator shapes.
compute_densityCompute the density compensation weights and set it.
compute_smapsCompute the sensitivity maps and set it.
data_consistencyCompute the gradient data consistency.
Return the Lipschitz constant of the operator.
make_autogradMake a new Operator with autodiff support.
Forward operator.
with_autogradReturn a Fourier operator with autograd capabilities.
with_off_resonance_correctionReturn a new operator with Off Resonnance Correction.
Attributes
autograd_availableavailablebackendcpx_dtypeReturn complex floating precision of the operator.
densityDensity compensation of the operator.
dtypeReturn dtype.
interfacesn_batchsNumber of coils for the operator.
n_coilsNumber of coils for the operator.
n_samplesReturn number of samples.
ndimNumber of dimensions in image space of the operator.
Norm factor of the operator.
samplesReturn samples as a N_slice x N_samples x 3 array.
shapeShape of the image space of the operator.
smapsSensitivity maps of the operator.
uses_densityReturn True if the operator uses density compensation.
uses_senseReturn True if the operator uses sensitivity maps.
- property norm_factor#
Norm factor of the operator.
- op(data, ksp=None)[source]#
Forward operator.
Note
This function uses
numpyfor all CPU arrays, andcupyfor all on-gpu array. It will convert all its array argument to the respective array library. The outputs will be converted back to the original array module and device.
- adj_op(coeffs, img=None)[source]#
Adjoint operator.
Note
This function uses
numpyfor all CPU arrays, andcupyfor all on-gpu array. It will convert all its array argument to the respective array library. The outputs will be converted back to the original array module and device.