#4 #1
Hello, thanks for sharing your code, I'm having trouble while running the code from "Js_inversion_simpeg0.20.ipynb"
error with 'sp.utils.writeVectorUBC', I cannot find any references.
`#Write out Lp model Spherical formulation (cartesian Lp doesnt exist)
mout = utils.cartesian2spherical(mopt_spherical_Lp.reshape((n_active, 3), order="F"))
temp = mout.reshape((active_map.nP, 3), order="F")
sp.utils.writeVectorUBC(mesh, datadir + 'Tongairo_S_Lp.fld', active_map.P * temp)
mesh.write_model_UBC(datadir + 'Tongairo_S_Lp_amp.mod', active_map_amp * (wires.amp * mopt_spherical_Lp))
#Write calculated data (Lp model)
Lp_calculated = simulation.dpred(mopt_spherical_Lp)
np.savetxt('L2_calculated_data.dat', Lp_calculated, fmt='%.4f')
RMS = np.sqrt(mse(Lp_calculated, survey.dobs))
print('RMS = %.3f mV' %RMS)`
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[31], line 5
1 #Write out Lp model Spherical formulation (cartesian Lp doesnt exist)
2 mout = utils.cartesian2spherical(mopt_spherical_Lp.reshape((n_active, 3), order="F"))
3 temp = mout.reshape((active_map.nP, 3), order="F")
4
----> 5 sp.utils.writeVectorUBC(mesh, datadir + 'Tongairo_S_Lp.fld', active_map.P * temp)
6
7 mesh.write_model_UBC(datadir + 'Tongairo_S_Lp_amp.mod', active_map_amp * (wires.amp * mopt_spherical_Lp))
8
AttributeError: module 'simpeg.electromagnetics.static.self_potential' has no attribute 'utils'`
#4 #1
Hello, thanks for sharing your code, I'm having trouble while running the code from "Js_inversion_simpeg0.20.ipynb"
error with 'sp.utils.writeVectorUBC', I cannot find any references.
`#Write out Lp model Spherical formulation (cartesian Lp doesnt exist)
mout = utils.cartesian2spherical(mopt_spherical_Lp.reshape((n_active, 3), order="F"))
temp = mout.reshape((active_map.nP, 3), order="F")
sp.utils.writeVectorUBC(mesh, datadir + 'Tongairo_S_Lp.fld', active_map.P * temp)
mesh.write_model_UBC(datadir + 'Tongairo_S_Lp_amp.mod', active_map_amp * (wires.amp * mopt_spherical_Lp))
#Write calculated data (Lp model)
Lp_calculated = simulation.dpred(mopt_spherical_Lp)
np.savetxt('L2_calculated_data.dat', Lp_calculated, fmt='%.4f')
RMS = np.sqrt(mse(Lp_calculated, survey.dobs))
print('RMS = %.3f mV' %RMS)`
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[31], line 5
1 #Write out Lp model Spherical formulation (cartesian Lp doesnt exist)
2 mout = utils.cartesian2spherical(mopt_spherical_Lp.reshape((n_active, 3), order="F"))
3 temp = mout.reshape((active_map.nP, 3), order="F")
4
----> 5 sp.utils.writeVectorUBC(mesh, datadir + 'Tongairo_S_Lp.fld', active_map.P * temp)
6
7 mesh.write_model_UBC(datadir + 'Tongairo_S_Lp_amp.mod', active_map_amp * (wires.amp * mopt_spherical_Lp))
8
AttributeError: module 'simpeg.electromagnetics.static.self_potential' has no attribute 'utils'`