Giter VIP home page Giter VIP logo

Comments (10)

halbmy avatar halbmy commented on June 23, 2024 1

I realized that pyBERT was overwriting the DataContainerERT.__repr__ function so that the included tokens were not shown. This is now corrected in the pyBERT code.

from gimli.

halbmy avatar halbmy commented on June 23, 2024

I would always prefer original instrument files as they bear more information (e.g. errors, current and voltage and not just apparent resistivity like in res2dinv). About the SuperSting import, there is an import routine in the pyBERT project (https://gitlab.com/resistivity-net/bert): https://gitlab.com/resistivity-net/bert/-/blob/master/python/pybert/importer/importData.py?ref_type=heads#L1845
Please try pb.importData('myfile.stg) and report any error by raising an issue in the BERT project, attaching your file, so that we can fix it.

from gimli.

halbmy avatar halbmy commented on June 23, 2024

The problem in your file is the following: the unified BERT/GIMLi format consists of a list of electrodes and then the ABMN columns are just indices into the electrode list, so instead of

890
# a b m n r ip/ms err/%
0    20   40   60   -5.01792E-01  1.20190E-02   5.00000E-01
0    20   60   80   -9.18413E-02  1.64594E-02   2.00000E-01
0    20   80   100  -4.80586E-02  7.63345E-03   5.00000E-01

you would have

6
#x y 
0 0
20 0
40 0
60 0
80 0
100 0
890
# a b m n r ip/ms err/%
1    2   3   4   -5.01792E-01  1.20190E-02   5.00000E-01
1    2   4   5   -9.18413E-02  1.64594E-02   2.00000E-01
1    3   5   6  -4.80586E-02  7.63345E-03   5.00000E-01

from gimli.

halbmy avatar halbmy commented on June 23, 2024

I copied the specified 8 lines into a file test.stg and read it successfully with

import pybert as pb
data = pb.importData("test.stg")
print(data)

with the result

Data: Sensors: 8 data: 5, nonzero entries: ['a', 'b', 'err', 'i', 'ip', 'ip1', 'ip2', 'ip3', 'ip4', 'ip5', 'ip6', 'm', 'n', 'rhoa', 'u', 'valid']

from gimli.

NoteboomM avatar NoteboomM commented on June 23, 2024

Thanks @halbmy. After a break for lunch, I re-read the BERT site and worked out what I had wrong there. And I agree, it's always good to go to the original where possible, but in my script to make my own BERT file, I carried over a few of those extra fields.

After fixing the BERT format, and with using pybert for the stg file, both import and seem to work with anything I try, thanks!

But maybe it's a separate issue, for both import approaches, I still only get this from print(data):

Data: Electrodes: 42 data: 889

I don't know that it is critical for other functions, but it's useful to have that list of nonzero fields.

from gimli.

halbmy avatar halbmy commented on June 23, 2024

Can you attach your stg file?

from gimli.

NoteboomM avatar NoteboomM commented on June 23, 2024

Here it is (zipped as github rejected the stg file). I've been trying a few more things, and different approaches/inversion settings, and everything seems fine with it practically speaking.

DD4384(1-3).zip

from gimli.

halbmy avatar halbmy commented on June 23, 2024

I did

import pybert as pb
data = pb.importData("DD4384(1-3).stg")
print(data, data.tokenList()) 
data.show()

and it works well

Data: Electrodes: 42 data: 889 SensorIdx: a b m n  Data: err i ip ip1 ip2 ip3 ip4 ip5 ip6 iperr k r rhoa u valid 

image

from gimli.

NoteboomM avatar NoteboomM commented on June 23, 2024

Thanks Thomas - can I pull that update from git or somewhere? I think I installed pybert from an anaconda prompt.

from gimli.

halbmy avatar halbmy commented on June 23, 2024

You don't really need this update if you print(data.tokenList()) which was just not included in print(data) when importing from pyBERT. Just a detail. But of course it is generally better to update pyBERT by git instead of conda (https://gitlab.com/resistivity-net/bert)

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.