Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add topography to the inversion using res2dinv .dat file #623

Closed
jcmefra opened this issue Nov 27, 2023 · 1 comment
Closed

Cannot add topography to the inversion using res2dinv .dat file #623

jcmefra opened this issue Nov 27, 2023 · 1 comment

Comments

@jcmefra
Copy link

jcmefra commented Nov 27, 2023

Problem description

Inversion is not showing topography

Your environment

            OS : Linux
        CPU(s) : 8
       Machine : x86_64
  Architecture : 64bit
           RAM : 15.6 GiB
   Environment : Jupyter
   File system : ext4

Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32)
[GCC 12.3.0]

       pygimli : 1.4.3
        pgcore : 1.4.0
         numpy : 1.25.0
    matplotlib : 3.7.2
         scipy : 1.11.2
       IPython : 8.14.0
       pyvista : 0.41.1

Steps to reproduce

Tell us how to reproduce this issue. Ideally, you could paste the code that produces the error:

import matplotlib.pyplot as plt
import numpy as np
import pygimli as pg
from pygimli.physics import ert

data = ert.load('Surveys/Topo_Nov24.dat')
print(data)

ax, cb = ert.show(data)

data["k"] = ert.geometricFactors(data)
data["err"] = ert.estimateError(data, relativeError=0.02, absoluteUError=50e-6)
mgr = ert.ERTManager(data, verbose=True,sr=False)

mgr.invert(lam=30, verbose=True)

kw = dict(logScale=True, cMap="Spectral_r", xlabel="x (m)", ylabel="y (m)", cMin=0, cMax=100000)
ax, cb = mgr.showResult(**kw)
ax.grid(True)
ax.set_ylim([-40, ax.get_ylim()[1]])
...

Expected behavior

Show the topography in the inversion

Actual behavior

image

.dat file is here (changed extension to csv)
Topo_Nov24.csv

If possible, please add one or more labels to your issue, e.g. if you expect that your issue is rather a question than a problem with the code, please add the label "question".

@jcmefra jcmefra changed the title Add topography to the inversion using res2dinv .dat file Cannot add topography to the inversion using res2dinv .dat file Nov 27, 2023
@jcmefra
Copy link
Author

jcmefra commented Nov 29, 2023

Well I figured out how to do it, just loaded the data and then used data.save('Surveys/nov24_pygimli.dat'), added the topography there and then loaded the file, got this:

image

Hope this helps someone in the future :)

@jcmefra jcmefra closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant