示例#1
0
 def createDefaultStartModel(self):
     """
     """
     res = pb.getComplexData(self.data())
     parCount = self.regionManager().parameterCount()
     re = pg.Vector(parCount, pg.mean(pg.math.real(res)))
     im = pg.Vector(parCount, -pg.mean(pg.math.imag(res)))
     return pg.cat(re, im)
 def createDefaultStartModel(self):
     """
     """
     res = pb.getComplexData(self.data())
     parCount = self.regionManager().parameterCount()
     re = pg.RVector(parCount, pg.mean(pg.real(res)))
     im = pg.RVector(parCount, -pg.mean(pg.imag(res)))
     return pg.cat(re, im)
示例#3
0
print(data)

mesh = pg.meshtools.createParaMesh2dGrid(data.sensorPositions())


fop = DCMultiElectrodeModellingC(mesh, data, verbose=True)
print(dir(fop))
print(fop.jacobian())
print(fop.jacobian().rows())

#fop = pb.DCMultiElectrodeModelling(mesh, data)

fop.regionManager().region(1).setBackground(True)
fop.createRefinedForwardMesh(refine=True, pRefine=False)

cData = pb.getComplexData(data)
mag = pg.abs(cData)
phi = -pg.phase(cData)

print(pg.norm(mag-data('rhoa')))
print(pg.norm(phi-data('ip')/1000))

inv = pg.Inversion(pg.cat(mag, phi),
                    fop,
                    verbose=True, dosave=True)


dataTrans = pg.trans.TransCumulative()
datRe = pg.trans.TransLog()
datIm = pg.trans.Trans()
dataTrans.add(datRe, data.size())
print(data)

mesh = pg.meshtools.createParaMesh2dGrid(data.sensorPositions())


fop = DCMultiElectrodeModellingC(mesh, data, verbose=True)
print(dir(fop))
print(fop.jacobian())
print(fop.jacobian().rows())

#fop = pb.DCMultiElectrodeModelling(mesh, data)

fop.regionManager().region(1).setBackground(True)
fop.createRefinedForwardMesh(refine=True, pRefine=False)

cData = pb.getComplexData(data)
mag = pg.abs(cData)
phi = -pg.phase(cData)

print(pg.norm(mag-data('rhoa')))
print(pg.norm(phi-data('ip')/1000))

inv = pg.RInversion(pg.cat(mag, phi),
                    fop,
                    verbose=True, dosave=True)


dataTrans = pg.RTransCumulative()
datRe = pg.RTransLog()
datIm = pg.RTrans()
dataTrans.add(datRe, data.size())