Skip to content

Commit

Permalink
ENH: enable reading topography from res2dinv data (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Günther committed Dec 13, 2023
1 parent 5f1033f commit 48ce372
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pygimli/physics/ert/importData.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,16 @@ def getNonEmptyRow(i, comment='#'):
if hasIP:
data.set('ip', dataBody[nn - 1])

istopo = int(getNonEmptyRow(it, comment=';'))
if istopo:
ntopo = int(getNonEmptyRow(it, comment=';'))
ap = data.additionalPoints()
for i in range(ntopo):
strs = getNonEmptyRow(it, comment=';').replace(',', ' ').split()
ap.push_back(pg.Pos([float(s) for s in strs]))

data.setAdditionalPoints(ap)

data.sortSensorsX()
data.sortSensorsIndex()
if return_header:
Expand Down

0 comments on commit 48ce372

Please sign in to comment.