IRGN

Module holding the classes for IRGN Optimization without streaming.

class pyqmri.irgn.ICOptimizer(par, model, trafo=1, imagespace=False, SMS=0, reg_type='TGV', config='', streamed=False, DTYPE=<class 'numpy.complex64'>, DTYPE_real=<class 'numpy.float32'>)

Main IC Optimization class.

This Class performs IC Optimization either with TGV or TV regularization.

Parameters:
  • par (dict) – A python dict containing the necessary information to setup the object. Needs to contain the number of slices (NSlice), number of scans (NScan), image dimensions (dimX, dimY), number of coils (NC), sampling points (N) and read outs (NProj) a PyOpenCL queue (queue) and the complex coil sensitivities (C).
  • model (pyqmri.model) – Which model should be used for fitting. Expects a pyqmri.model instance.
  • trafo (int, 1) – Select radial (1, default) or cartesian (0) sampling for the fft.
  • imagespace (bool, false) – Perform the fitting from k-space data (false, default) or from the image series (true)
  • SMS (int, 0) – Select if simultaneous multi-slice acquisition was used (1) or standard slice-by-slice acquisition was done (0, default).
  • reg_type (str, "TGV") – Select between “TGV” (default) or “TV” regularization.
  • config (str, '') – Name of config file. If empty, default config file will be generated.
  • streamed (bool, false) – Select between standard reconstruction (false) or streamed reconstruction (true) for large volumetric data which does not fit on the GPU memory at once.
  • DTYPE (numpy.dtype, numpy.complex64) – Complex working precission.
  • DTYPE_real (numpy.dtype, numpy.float32) – Real working precission.
par

A python dict containing the necessary information to setup the object. Needs to contain the number of slices (NSlice), number of scans (NScan), image dimensions (dimX, dimY), number of coils (NC), sampling points (N) and read outs (NProj) a PyOpenCL queue (queue) and the complex coil sensitivities (C).

Type:dict
gn_res

The residual values for of each Gauss-Newton step. Each iteration appends its value to the list.

Type:list of floats
irgn_par

The parameters read from the config file to guide the IRGN optimization process

Type:dict
execute(data)

Start the IRGN optimization.

This method performs iterative regularized Gauss-Newton optimization and calls the inner loop after precomputing the current linearization point. Results of the fitting process are saved after each linearization step to the output folder.

Parameters:data (numpy.array) – the data to perform optimization/fitting on.
class pyqmri.irgn.IRGNOptimizer(par, model, trafo=1, imagespace=False, SMS=0, reg_type='TGV', config='', streamed=False, DTYPE=<class 'numpy.complex64'>, DTYPE_real=<class 'numpy.float32'>)

Main IRGN Optimization class.

This Class performs IRGN Optimization either with TGV or TV regularization.

Parameters:
  • par (dict) – A python dict containing the necessary information to setup the object. Needs to contain the number of slices (NSlice), number of scans (NScan), image dimensions (dimX, dimY), number of coils (NC), sampling points (N) and read outs (NProj) a PyOpenCL queue (queue) and the complex coil sensitivities (C).
  • model (pyqmri.model) – Which model should be used for fitting. Expects a pyqmri.model instance.
  • trafo (int, 1) – Select radial (1, default) or cartesian (0) sampling for the fft.
  • imagespace (bool, false) – Perform the fitting from k-space data (false, default) or from the image series (true)
  • SMS (int, 0) – Select if simultaneous multi-slice acquisition was used (1) or standard slice-by-slice acquisition was done (0, default).
  • reg_type (str, "TGV") – Select between “TGV” (default) or “TV” regularization.
  • config (str, '') – Name of config file. If empty, default config file will be generated.
  • streamed (bool, false) – Select between standard reconstruction (false) or streamed reconstruction (true) for large volumetric data which does not fit on the GPU memory at once.
  • DTYPE (numpy.dtype, numpy.complex64) – Complex working precission.
  • DTYPE_real (numpy.dtype, numpy.float32) – Real working precission.
par

A python dict containing the necessary information to setup the object. Needs to contain the number of slices (NSlice), number of scans (NScan), image dimensions (dimX, dimY), number of coils (NC), sampling points (N) and read outs (NProj) a PyOpenCL queue (queue) and the complex coil sensitivities (C).

Type:dict
gn_res

The residual values for of each Gauss-Newton step. Each iteration appends its value to the list.

Type:list of floats
irgn_par

The parameters read from the config file to guide the IRGN optimization process

Type:dict
applyPrecond(inp)
execute(data)

Start the IRGN optimization.

This method performs iterative regularized Gauss-Newton optimization and calls the inner loop after precomputing the current linearization point. Results of the fitting process are saved after each linearization step to the output folder.

Parameters:data (numpy.array) – the data to perform optimization/fitting on.
removePrecond(inp)