Giter VIP home page Giter VIP logo

Comments (15)

samthiele avatar samthiele commented on June 2, 2024 1

And @flohorovicic - yes; other than the padding, I can load and run .his files created using the Noddy GUI without any (other) issues

from pynoddy.

samthiele avatar samthiele commented on June 2, 2024

Oh, and this is the generated .his file ==> seems fine to me.
model.txt

from pynoddy.

markjessell avatar markjessell commented on June 2, 2024

from pynoddy.

samthiele avatar samthiele commented on June 2, 2024

Good idea - the output saved by Noddy can be loaded by pynoddy with no issue - though the differences seem rather trivial to me (see below; red is from noddy, green from pynoddy). Perhaps a floating point issue? Anyway - I'm curious to see if anyone else can reproduce this, or if I just have something weird going on locally.

Screen Shot 2021-03-08 at 4 29 14 pm

model001.txt

from pynoddy.

samthiele avatar samthiele commented on June 2, 2024

Gah! There's deffo something funny going on.... I'm getting outputs that have the wrong extent too (tested using .his files generated with the GUI). I can change the cell size, but somehow the extent (calculated via pynoddy) is fixed to (3400.0, 3400.0, 500.0). Maybe I'm just allergic to Macs 😅

his = NoddyHistory("axes.his")
print(".his extent = ", his.get_extent())
pynoddy.compute_model("axes.his","0_output", sim_type='BLOCK')
model = NoddyOutput("0_output")
print("Output extent = ", (model.xmax - model.xmin, model.ymax - model.ymin, model.zmax - model.zmin))
print("              =  %s %d m blocks" % (model.block.shape,model.delx) )

.his extent = (1000.0, 1000.0, 500.0)
Output extent = (3400.0, 3400.0, 500.0)
= (170, 170, 25) 20 m blocks

axes.txt

from pynoddy.

flohorovicic avatar flohorovicic commented on June 2, 2024

Sorry for the late answer - how could I miss the notification for a pynoddy error :-D I'll have a look - maybe related to an additional (or a missing) new line?

from pynoddy.

flohorovicic avatar flohorovicic commented on June 2, 2024

So, I can open both files that you attached above just fine. Can you send the model.his that fails over again?

from pynoddy.

samthiele avatar samthiele commented on June 2, 2024

I figured out the problem with the save/load issue - somehow pynoddy was installing an older version; when I instead installed it with python setup_without_SALib.py install then it fixed the issue (I noticed because the version number in the .his files was different to what pynoddy should be writing).

Still haven't figured out why the noddy executable is building models with incorrect extents though. Could be something strange going on with my setup again... If you run the axes.his file do you get the correct extent? (1000,1000,500)?

from pynoddy.

flohorovicic avatar flohorovicic commented on June 2, 2024

Thanks, that's an important point - I need to update the pip release!

Concerning the extent: I get:

image

from pynoddy.

samthiele avatar samthiele commented on June 2, 2024

Thanks for testing - I suppose this must be some strange thing I have going on locally. Will try installing pynoddy from scratch and see if that helps. I guess we can close this issue now 👍

from pynoddy.

samthiele avatar samthiele commented on June 2, 2024

Small update - I managed to get noddy to compute with the correct extents by copying the events and block options (and nothing else) from the .his file (Version = 7.11) exported from the Noddy GUI into a .his file created from scratch using pynoddy (Version = 7.03).

Doing a diff between the two files (see attached) it seems there are quite a few differences in the GeophysicsOptions - could this be causing the padding to occur somehow? (given I presume Noddy does pad the model when calculating gravity / magnetic forward models? ).

Screen Shot 2021-03-11 at 2 15 10 pm

axes_pynoddy.his.txt

axes_noddy.his.txt

from pynoddy.

markjessell avatar markjessell commented on June 2, 2024

from pynoddy.

flohorovicic avatar flohorovicic commented on June 2, 2024

Thanks a lot for clarifying, @markjessell! It was not obvious to me that you were trying a geophysical forward model, @samthiele. But it should still be possible to load the .his-file created in Noddy with pynoddy. Does that work now (considering the aspect of extra padding)?

from pynoddy.

samthiele avatar samthiele commented on June 2, 2024

Thanks @markjessell - that it what I suspected was happening. And @flohorovicic - I'm not trying to run a geophysical forward model, and am running pynoddy in BLOCK mode. I think this is just the "default" setup that is saved when using the Noddy GUI (which must automatically trim the model somehow before displaying it?).

Maybe we should add something to pynoddy that sets GPSRange to 0 unless 'geophys' in sim_type.lower() or 'all' in sim_type.lower()? Either that or it automatically trims the padding off the block - I find it counterintuitive that a model built using the GUI gives different results when run in pynoddy.

from pynoddy.

flohorovicic avatar flohorovicic commented on June 2, 2024

Problem resolved

from pynoddy.

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.