parameters: (f, amp, error=0.01, lam=1000., mstart=None,
               taupar=(1e-2, 1e-5, 100), cpar=(0.5, 0, 1))
return_statement: return model, response
docstring: Fit amplitude spectrum by Cole-Cole model.
docstring_summary: Fit amplitude spectrum by Cole-Cole model.
docstring_tokens: Fit amplitude spectrum by Cole - Cole model .
function: def fitCCAbs(f, amp, error=0.01, lam=1000., mstart=None,
               taupar=(1e-2, 1e-5, 100), cpar=(0.5, 0, 1)):
      """Fit amplitude spectrum by Cole-Cole model."""
      fCC = ColeColeAbs(f)
      tLog = pg.trans.TransLog()
      fCC.region(0).setStartValue(max(amp))
      if mstart is None:  # compute from amplitude decay
          mstart = 1. - min(amp) / max(amp)
      fCC.region(1).setParameters(mstart, 0, 1)    # m (start,lower,upper)
      fCC.region(2).setParameters(*taupar)  # tau
      fCC.region(3).setParameters(*cpar)   # c
      ICC = pg.core.Inversion(amp, fCC, tLog, tLog, False)  # set up inversion class
      ICC.setRelativeError(error)  # perr + ePhi/data)
      ICC.setLambda(lam)  # start with large damping and cool later
      ICC.setMarquardtScheme(0.8)  # lower lambda by 20%/it., no stop chi=1
      model = np.asarray(ICC.run())  # run inversion
      ICC.echoStatus()
      response = np.asarray(ICC.response())
      return model, response
function_tokens: def fitCCAbs ( f , amp , error = 0.01 , lam = 1000. , mstart = None , taupar = ( 1e-2 , 1e-5 , 100 ) , cpar = ( 0.5 , 0 , 1 ) ) : fCC = ColeColeAbs ( f ) tLog = pg . trans . TransLog ( ) fCC . region ( 0 ) . setStartValue ( max ( amp ) ) if mstart is None : # compute from amplitude decay mstart = 1. - min ( amp ) / max ( amp ) fCC . region ( 1 ) . setParameters ( mstart , 0 , 1 ) # m (start,lower,upper) fCC . region ( 2 ) . setParameters ( * taupar ) # tau fCC . region ( 3 ) . setParameters ( * cpar ) # c ICC = pg . core . Inversion ( amp , fCC , tLog , tLog , False ) # set up inversion class ICC . setRelativeError ( error ) # perr + ePhi/data) ICC . setLambda ( lam ) # start with large damping and cool later ICC . setMarquardtScheme ( 0.8 ) # lower lambda by 20%/it., no stop chi=1 model = np . asarray ( ICC . run ( ) ) # run inversion ICC . echoStatus ( ) response = np . asarray ( ICC . response ( ) ) return model , response