class_docstr: Mean signal Diffusion Kurtosis Model
      
class_docstr_tok: ["Mean","signal","Diffusion","Kurtosis","Model"]
docstr: Mean Signal Diffusion Kurtosis Model [1]_.
  
  Parameters
  ----------
  gtab : GradientTable class instance
  
  bmag : int
      The order of magnitude that the bvalues have to differ to be
      considered an unique b-value. Default: derive this value from the
      maximal b-value provided: $bmag=log_{10}(max(bvals)) - 1$.
  
  return_S0_hat : bool
      If True, also return S0 values for the fit.
  
  args, kwargs : arguments and keyword arguments passed to the
  fit_method. See msdki.wls_fit_msdki for details
  
  References
  ----------
  .. [1] Henriques, R.N., 2018. Advanced Methods for Diffusion MRI Data
         Analysis and their Application to the Healthy Ageing Brain
         (Doctoral thesis). Downing College, University of Cambridge.
         https://doi.org/10.17863/CAM.29356
docstr_tok: ["Mean","Signal","Diffusion","Kurtosis","Model","[","1","]","_.","Parameters","--","--","--","--","--","gtab",":","GradientTable","class","instance","bmag",":","int","The","order","of","magnitude","that","the","bvalues","have","to","differ","to","be","considered","an","unique","b-value",".","Default",":","derive","this","value","from","the","maximal","b-value","provided",":","$","bmag=log_","{","10","}","(","max","(","bvals",")",")","-","1","$",".","return_S0_hat",":","bool","If","True",",","also","return","S0","values","for","the","fit",".","args",",","kwargs",":","arguments","and","keyword","arguments","passed","to","the","fit_method",".","See","msdki.wls_fit_msdki","for","details","References","--","--","--","--","--","..","[","1","]","Henriques",",","R.N.",",","2018",".","Advanced","Methods","for","Diffusion","MRI","Data","Analysis","and","their","Application","to","the","Healthy","Ageing","Brain","(","Doctoral","thesis",")",".","Downing","College",",","University","of","Cambridge",".","https",":","\/\/doi.org\/10.17863\/CAM.29356"]
code: def __init__(
      self, gtab, bmag=None, return_S0_hat=False, *args, **kwargs
  ):
      """Mean Signal Diffusion Kurtosis Model [1]_.
  
      Parameters
      ----------
      gtab : GradientTable class instance
  
      bmag : int
          The order of magnitude that the bvalues have to differ to be
          considered an unique b-value. Default: derive this value from the
          maximal b-value provided: $bmag=log_{10}(max(bvals)) - 1$.
  
      return_S0_hat : bool
          If True, also return S0 values for the fit.
  
      args, kwargs : arguments and keyword arguments passed to the
      fit_method. See msdki.wls_fit_msdki for details
  
      References
      ----------
      .. [1] Henriques, R.N., 2018. Advanced Methods for Diffusion MRI Data
             Analysis and their Application to the Healthy Ageing Brain
             (Doctoral thesis). Downing College, University of Cambridge.
             https://doi.org/10.17863/CAM.29356
  
      """
      ReconstModel.__init__(self, gtab)
  
      self.return_S0_hat = return_S0_hat
      self.ubvals = unique_bvals_magnitude(gtab.bvals, bmag=bmag)
      self.design_matrix = design_matrix(self.ubvals)
      self.bmag = bmag
      self.args = args
      self.kwargs = kwargs
      self.min_signal = self.kwargs.pop(
          "min_signal", MIN_POSITIVE_SIGNAL
      )
      if self.min_signal is not None and self.min_signal <= 0:
          e_s = (
              "The `min_signal` key-word argument needs to be strictly"
          )
          e_s += " positive."
          raise ValueError(e_s)
  
      # Check if at least three b-values are given
      enough_b = check_multi_b(self.gtab, 3, non_zero=False, bmag=bmag)
      if not enough_b:
          mes = "MSDKI requires at least 3 b-values (which can include b=0)"
          raise ValueError(mes)
  
imports: import numpy
  import scipy.optimize
  from dipy.core.gradients import check_multi_b, unique_bvals_magnitude, round_bvals
  from dipy.reconst.base import ReconstModel
  from dipy.reconst.dti import MIN_POSITIVE_SIGNAL
  from dipy.core.ndindex import ndindex
  from dipy.core.onetime import auto_attr
label_desc: Use image node_id 1 to create a new MeanDiffusionKurtosisModel object from inherited base classes: ReconstModel with example: obj = MeanDiffusionKurtosisModel(gtab, bmag, return_S0_hat)