How to invert resistivity or to conductivity

Hello I would like to know where I have to change in the code for inverting to resistivity/conductivity

Hi jcbarreto,

Most examples we provide actually invert for Log-Conductivity. You can identify that by looking at the Problem object. if it is created with a sigmaMap, it will invert for conductivity. And we usually give it a Maps.ExpMap to invert for the Log. For example the following is how we specify the model to be Log-Conductivity:

from SimPEG import EM, Maps
mapping = Maps.ExpMap(mesh)
prb = EM.TDEM.Problem3D_b(mesh, sigmaMap=mapping)

I have actually never tried it myself but it seems you can switch to resistivity by setting a rhoMap instead. Like:

prb = EM.TDEM.Problem3D_b(mesh, rhoMap=mapping)

Another way would be to use a ReciprocalMap (which is what happens under the hood I think).

mapping = Maps.ReciprocalMap(mesh)

I hope this helps.

1 Like

Yep, thanks @thibaut.astic! One quick comment to also just be careful if you are using an InjectActiveCells Map in the inversion to make sure that the inactive cells are in units of Ohm-m if you provide a rhoMap to the simulation and in units of S/m if you are using a sigmaMap

Good Point! thanks for reminding me