Giter VIP home page Giter VIP logo

Comments (8)

halbmy avatar halbmy commented on June 16, 2024

A simple bug only occuring for Pole-Dipole that was corrected (eedac16)

from gimli.

shdlovezxm avatar shdlovezxm commented on June 16, 2024

There was an error during terrain import because the Sensors are 73, while the terrain data is only 30. How should I handle this?

print(data)
print(data.sensorCount())

Data: Sensors: 73 data: 358, nonzero entries: ['a', 'b', 'm', 'n', 'rhoa', 'valid']
73

0 1291.784
5 1289.801
10 1287.954
15 1286.057
20 1284.747
25 1282.701
30 1280.152
35 1278.045
40 1276.219
45 1274.407
50 1271.613
55 1270.119
60 1268.588
65 1266.813
70 1264.946
75 1264.023
80 1265.691
85 1265.998
90 1264.944
95 1263.731
100 1259.808
105 1256.49
110 1252.827
115 1249.332
120 1246.578
125 1243.499
130 1240.428
135 1238.206
140 1236.123
145 1234.132

from gimli.

halbmy avatar halbmy commented on June 16, 2024

Generally, topographic data are having a different discretization. However, it seems like the are not read from the res2dinv file. Try reading them with numpy and use the following function for interpolation:
https://www.pygimli.org/pygimliapi/_generated/pygimli.meshtools.html#pygimli.meshtools.interpolateAlongCurve

from gimli.

shdlovezxm avatar shdlovezxm commented on June 16, 2024

I understand. Thank you very much for your patient response. Good luck to you.

from gimli.

halbmy avatar halbmy commented on June 16, 2024

We enabled reading topography from res2dinv file format (48ce372).

Note that the points are read but not yet automatically applied to the electrode positions, which might make sense later in a script. One can use

data.setSensorPositions(pg.meshtools.tapeMeasureToCoordinates(data.additionalPoints(), pg.x(data)))

However, in your case there is something wrong as your electrodes go beyond zero. So either there is something wrong in your data file, or our import routine has a bug for pole-dipole in conjunction for midpoint (is it between M and N or between A and M or the mean of A,M,N?) positions specified. We will have to check but you should do so as well as independent on topography, your data are not correctly read.

from gimli.

halbmy avatar halbmy commented on June 16, 2024

Any reply to my last comment on the wrong data?

Note that we have released version v.1.4.6 supporting res2dinv topography information.

from gimli.

halbmy avatar halbmy commented on June 16, 2024

I've checked the code of the current version v1.4.6 with some other res2dinv files and the following procedure works well:

topo = data.additionalPoints()  # 
elec = pg.meshtools.tapeMeasureToCoordinates(topo, pg.x(data))
data.setSensorPositions(elec)

It assumes that the x coordinates in the data file are along the topography.
You can check the positions by

plt.plot(pg.x(topo), pg.y(topo), ".-", label="topo")
plt.plot(pg.x(elec), pg.y(elec), "+", markersize=4, label="electrodes")
plt.grid()
plt.legend()

from gimli.

halbmy avatar halbmy commented on June 16, 2024

In your case the electrodes start at -30m.

If you're sure that your format is correct and the import of Pole-Dipole data is wrong, please open a new issue.

from gimli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.