MRIFourierCorrected#
- class mrinufft.operators.off_resonance.MRIFourierCorrected(fourier_op, b0_map=None, readout_time=None, r2star_map=None, mask=None, interpolator='svd')[source]#
Bases:
FourierOperatorBaseFourier Operator with B0 Inhomogeneities compensation.
This is a wrapper around the Fourier Operator to compensate for the B0 inhomogeneities in the k-space.
- Parameters:
fourier_op (FourierOperatorBase) – Existing NUFFT operator.
b0_map (NDArray) – Static field inhomogeneities map.
b0_mapandreadout_timeshould have reciprocal units. (e.g. [Hz] and [s]) Also supports Cupy arrays and Torch tensors.readout_time (NDArray) – Readout time in
[s]of shape(n_shots, n_pts)or(n_shots * n_pts,). Also supports Cupy arrays and Torch tensors.mask (NDArray, optional) – Boolean mask of the region of interest (e.g., corresponding to the imaged object). This is used to exclude the background field-map values from histogram computation. The default is
None(use the whole map). Also supports Cupy arrays and Torch tensors.r2star_map (NDArray, optional) – Effective transverse relaxation map (R2*).
r2star_mapandreadout_timeshould have reciprocal units (e.g. [Hz] and [s]). Must have same shape asb0_map. The default isNone(purely imaginary field). Also supports Cupy arrays and Torch tensors.interpolators (str, dict, tuple[NDArray, NDArray]) –
Determine how to decompose the field-map.
If
str, use an existing method in extra/field_map.py with default parametersIf
{"name":name, **kwargs}use an existing method in extra_field_map.py parameterize by kwargs.If``tuple[NDArray, NDArray]`` use this directly as the decomposition (B and C)
interpolator (str | dict | tuple[ndarray[tuple[int, ...], dtype[_ScalarType_co]], ndarray[tuple[int, ...], dtype[_ScalarType_co]]])
Notes
The total field map used to calculate the field coefficients is
field_map = R2*_map + 1j * B0_map. If R2* is not provided, the field is purely imaginary:field_map = 1j * B0_map.You can also use the method
.with_off_resonance_correctionto augment an existing operator with off-resonance correction capability.See also
Methods
__init__Compute Adjoint Operation with off-resonance effect.
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.
Decompose the field-map in space and time-wise interpolators.
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.
Compute Forward Operation with off-resonance effect.
with_autogradReturn a Fourier operator with autograd capabilities.
with_off_resonance_correctionReturn a new operator with Off Resonnance Correction.
Attributes
autograd_availablecpx_dtypeReturn complex floating precision of the operator.
densityDensity compensation of the operator.
dtypeReturn floating precision of the operator.
interfacesn_batchsNumber of coils for the operator.
n_coilsNumber of coils for the operator.
Number of interpolators used to approximate the off-resonance effects.
n_samplesReturn the number of samples used by the operator.
Number of time points in a shot.
ndimNumber of dimensions in image space of the operator.
norm_factorNormalization factor of the operator.
samplesReturn the samples used by the operator.
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.
backendavailableExamples using
mrinufft.operators.off_resonance.MRIFourierCorrected#- compute_interpolator(interpolators, field_map, readout_time, mask)[source]#
Decompose the field-map in space and time-wise interpolators.
Sets the B and C attributes.
- Parameters:
interpolators (str | dict | tuple[ndarray[tuple[int, ...], dtype[_ScalarType_co]], ndarray[tuple[int, ...], dtype[_ScalarType_co]]])
field_map (ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None)
readout_time (ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None)
mask (ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None)
- op(data, *args)[source]#
Compute Forward Operation with off-resonance effect.
- Parameters:
data (NDArray) – N-D input image.
- Returns:
Masked distorted N-D k-space. Array module is the same as input data.
- Return type:
NDArray
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, *args)[source]#
Compute Adjoint Operation with off-resonance effect.
- Parameters:
coeffs (NDArray) – k-space data
- Returns:
Inverse Fourier transform of the distorted input k-space. Array module is the same as input coeffs.
- Return type:
NDArray
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.
- property n_interpolators#
Number of interpolators used to approximate the off-resonance effects.
- property n_samples_per_shot#
Number of time points in a shot.