In [1]:
import SimPEG as simpeg
import simpegMT as simpegmt


Efficiency Warning: Interpolation will be slow, use setup.py!

            python setup.py build_ext --inplace
    

In [6]:
#Define the mesh
m1d = simpeg.Mesh.TensorMesh([[(100,5,1.5),(100.,10),(100,5,1.5)]], x0=['C'])
sigma = np.zeros(m1d.nC) + 2e-3
sigma[m1d.gridCC[:]>200] = 1e-8

In [17]:
# Calculate the analytic fields
freqs = np.logspace(4,-1,26)
Z = []
for freq in freqs:
    Ed, Eu, Hd, Hu = simpegmt.Utils.getEHfields(m1d,sigma,freq,np.array([200]))
    Z.append((Ed + Eu)/(Hd + Hu))

In [19]:
Zarr = np.concatenate(Z)

In [20]:
def appResPhs(freq,z):
    app_res = ((1./(8e-7*np.pi**2))/freq)*np.abs(z)**2
    app_phs = np.arctan2(-z.imag,z.real)*(180/np.pi)
    return app_res, app_phs
app_r, app_p = appResPhs(freqs,Zarr)

In [21]:
app_r


Out[21]:
array([ 499.99998067,  499.99999231,  499.99999694,  499.99999878,
        499.99999951,  499.99999981,  499.99999992,  499.99999997,
        499.99999999,  500.        ,  500.        ,  500.        ,
        500.        ,  500.        ,  500.        ,  500.        ,
        500.        ,  500.        ,  500.        ,  500.        ,
        500.        ,  500.        ,  500.        ,  500.        ,
        500.        ,  500.        ])

In [ ]: