From 48ce37203a161d935fbb0e7ba86ad8ed12ebae67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Wed, 13 Dec 2023 10:22:01 +0100 Subject: [PATCH] ENH: enable reading topography from res2dinv data (#629) --- pygimli/physics/ert/importData.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pygimli/physics/ert/importData.py b/pygimli/physics/ert/importData.py index 25b8fc821..45da5b3ee 100644 --- a/pygimli/physics/ert/importData.py +++ b/pygimli/physics/ert/importData.py @@ -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: