parameters: (self, nr=0, nlay=4, thickness=None)
return_statement: return self.model
docstring: Do inversion.
docstring_summary: Do inversion.
docstring_tokens: Do inversion .
function: def invert(self, nr=0, nlay=4, thickness=None):
          """Do inversion."""
          self.fop = self.getFOP(nr)
          snd = self.DATA[nr]
          rhoa, t, err = get_rhoa(snd)
          self.fop.t = t
          model = self.fop.createStartModel(rhoa, nlay, thickness=None)
          self.INV = pg.frameworks.MarquardtInversion(fop=self.fop)
          # self.INV = pg.Inversion(rhoa, self.fop)
          # self.INV.setMarquardtScheme(0.9)
          # self.INV.setModel(model)
          # self.INV.setLambda(1000)
          # self.INV.setRelativeError(snd.pop('ST_DEV', 0)/snd['VOLTAGE']+0.03)
          errorVals = snd.pop('ST_DEV', 0)/snd['VOLTAGE']+0.03
          self.model = self.INV.run(dataVals=rhoa, errorVals=errorVals,
                                    startModel=model)
          return self.model
function_tokens: def invert ( self , nr = 0 , nlay = 4 , thickness = None ) : self . fop = self . getFOP ( nr ) snd = self . DATA [ nr ] rhoa , t , err = get_rhoa ( snd ) self . fop . t = t model = self . fop . createStartModel ( rhoa , nlay , thickness = None ) self . INV = pg . frameworks . MarquardtInversion ( fop = self . fop ) # self.INV = pg.Inversion(rhoa, self.fop) # self.INV.setMarquardtScheme(0.9) # self.INV.setModel(model) # self.INV.setLambda(1000) # self.INV.setRelativeError(snd.pop('ST_DEV', 0)/snd['VOLTAGE']+0.03) errorVals = snd . pop ( 'ST_DEV' , 0 ) / snd [ 'VOLTAGE' ] + 0.03 self . model = self . INV . run ( dataVals = rhoa , errorVals = errorVals , startModel = model ) return self . model