import SimPEG #hide
import SimPEG.PF as PF #hide
import os #hide
import sys #hide
basePath = os.path.sep.join(os.path.abspath(os.getenv('HOME')).split(os.path.sep)+['Downloads']+['SimPEGtemp']) #hide    input_file = basePath + os.path.sep + 'SimPEG_PF_Input.inp' #hide
input_file = basePath + os.path.sep + 'SimPEG_PF_Input.inp' #hide
driver = PF.MagneticsDriver.MagneticsDriver_Inv(input_file) #hide
mesh = driver.mesh #hide
initm = driver.m0 #hide

initm[initm==-100] = np.nan

# Create a figure and plot sections
fig, ax1 = plt.figure(), plt.subplot(1,2,1)
mesh.plotSlice(initm, ax = ax1, normal='Z', ind=18, clim = (0,0.02), pcolorOpts={'cmap':'viridis'})
plt.gca().set_aspect('equal')
plt.title('Z: '+str(mesh.vectorCCz[18]) + " m")

ax2 = plt.subplot(1,2,2)
mesh.plotSlice(initm, ax = ax2, normal='Y', ind=16, clim = (0,0.02), pcolorOpts={'cmap':'viridis'})
plt.gca().set_aspect('equal')
plt.title('Y: '+str(mesh.vectorCCy[16])+' m')

plt.show()