Loading petrophysical file

I am not able to load a .p extension file with simpeg. It says No module named ‘SimPEG.Utils’. Please resolve my issue. Thank you in advance. Below is the code that I am using
A= open(‘C:\Users\Astic-2020-JointInversion-master\Petrophysics\gmm_density_HK.p’,‘rb’)
clf = pickle.load(A)
n = clf.n_components

Hi @shreya,
pickle files are sensitive to renaming (here, Utils was renamed utils in SimPEG). Thus, they are not compatible with the new distribution of SimPEG. Furthermore, it is worth noting all the notebooks in that repository relies on an older version of SimPEG.

Two things.

  1. If you really need it, you can regenerate the pickle files using the notebook: Astic-2020-JointInversion/Create_petrophysical_GMM.ipynb at master · simpeg-research/Astic-2020-JointInversion · GitHub. It will likely need some fixes (like Utils → utils) but should not be too troublesome.

  2. But what I would highly recommend if you are more interested in the joint inversion side: the same synthetic example was turned into a tutorial with an octree mesh (with and without prior petrophysical information): Joint Inversion — SimPEG 0.17.0 documentation

1 Like