Obsolete functions in example code for Kevitsa gravity inversion

I tried running the example code on http://computation.geosci.xyz/case-studies/PF/Kevitsa_Grav_Inv.html and noticed that some of the functions used here seem obsolete. For example, when running the following code,

obs = driver.readGravityObservations(files['data'])

I got an attribute error that reads ‘GravityDriver_inv’ object has no attribute ‘readGravityObservations’.

I guess either my SimPEG version is outdated, or the example code is outdated. Is it possible to update the example code on the webpage? (I wish I could do it, but given my very limited SimPEG knowledge, I have not figured out a way…).

Thanks in advance!

Hi @jsun29, thanks for pointing this out! The examples on computation are quite behind… So for the time being, I would recommend you use the ones in the SimPEG docs as a guide: http://docs.simpeg.xyz/content/tutorials/03-gravity/index.html

However, we can bring this up at the next group meeting. It might be nice if we could sort through and prioritize which of these examples might be advantageous to have in the docs (cc @domfournier, @doug)

Hi @lheagy, thanks for getting back to me! And thanks for pointing me to the SimPEG docs! I was not aware of it.

Magically, shortly after my post, I was able to make some changes to the codes on that webpage and make it run! (Looks like I am smarter than I thought :slight_smile:

And yes, I think it would be great to discuss this and prioritize them. This would be tremendously helpful for those new users (which I imagine would increase significantly in the next few years). And I am more than happy to help update the example codes, to the best I can (I am still learning the basics of SimPEG).

Since we are on this topic, here is another one Kevitsa: Magnetic Simulation — computation 0.0.1 documentation (geosci.xyz) where
truData = driver.readMagneticsObservations('MagSim.dat')
locXyz = truData.srcField.rxList[0].locs

prob = PF.Magnetics.MagneticVector(mesh, chiMap=idenMap, actInd=actv)
PF.Magnetics.dipazm_2_xyz(np.ones(nC)*inc, np.ones(nC)*dec))
PF.Magnetics.plot_obs_2D

all seem to be obsolete.

I have developed a more updated version of the code (attached below) that runs on my computer (I am using SimPEG version 0.13.0).
MagRemSim_Kevitsa.ipynb (10.0 KB) MagRemSim_Kevitsa.py (3.5 KB)

1 Like