mri.scripts.gridsearch#

class _TestCase(kspace_data, linear_op_class, regularizer_op_class, linear_op_kwargs, regularizer_op_kwargs, optimizer_kwargs)[source]#

Bases: object

Internal Class to save a test case in a format and call reconstruct

Parameters
  • kspace_data (numpy.ndarray) – the kspace data for reconstruction

  • linear_op_class (class) – linear operator initialization class

  • linear_op_kwargs (dict) – kwargs for initializing linear operator

  • regularizer_op_class (class) – regularizer operator initialization class

  • regularizer_op_kwargs (dict) – kwargs for initializing regularizer operator

  • optimizer_kwargs (dict) – kwargs for optimizer

reconstruct_case(fourier_op, reconstructor_class, reconstructor_kwargs, fourier_params=None)[source]#

Internal Function to carry out reconstruction for a special case. This function pulls in appropriate keyword arguments from input and declares appropriate Linear, Fourier and Regularizer Operators. These operators later are used to create the image model by defining the reconstructor. Then the reconstruction is carried and results are returned

Parameters
  • fourier_op (object of class FFT) – this defines the fourier operator. for NonCartesianFFT, please make fourier_op as None and pass fourier_params to allow parallel execution

  • reconstructor_class (class) – reconstructor class

  • reconstructor_kwargs (dict) – extra kwargs for reconstructor

  • fourier_params (dict, default None) – holds dictionary with init_class pointing to fourier class to be used and args having keyword arguments for initialization This is passed only if fourier_op is None so that fourier_op can be made on spot during reconstruction. NOTE: We declare fourier operator inside this function to allow parallel execution as NonCartesianFFT cannot be pickled.

gather_result(metric, results, metric_direction=None)[source]#

Gather the best reconstruction result.

launch_grid(kspace_data, reconstructor_class, reconstructor_kwargs, fourier_op=None, linear_params=None, regularizer_params=None, optimizer_params=None, compare_metric_details=None, n_jobs=1, verbose=0)[source]#

This function launches off reconstruction for a grid specified through use of kwarg dictionaries.