Code Monkey home page Code Monkey logo

Comments (4)

rob-smallshire avatar rob-smallshire commented on August 31, 2024

There are plenty of use cases which don't need to involve numpy, and which don't even use the trace data, such as indexing and searching of large numbers of SEG Y files which only uses the headers.

Furthermore, I'd like to retain the option of running on PyPy (or indeed Jython or IronPython when they eventually attain Python 3 compatibility).

So, no, I won't be maying core Segpy depend on numpy. That said, you can expect segpy_numpy to contain many more useful tools along the lines of what you suggest, which will be layered on top of segpy. I have some of my own bumpy wrappers, but I haven't incorporated them yet. I want to get core segpy stable and released first.

from segpy.

rth avatar rth commented on August 31, 2024

Fair enough. Thanks for your response. It is true that Jython, and IronPython don't play so well with numpy. PyPy should get there though. I'll be looking into wrappers with numpy on top of segpy then, thanks.

from segpy.

rob-smallshire avatar rob-smallshire commented on August 31, 2024

I've added into segpy_numpy some experimental wrappers for extracting as numpy arrays trace header fields, inlines, cross lines and time slices from 3-d surveys. They're essentially untested at this point, but you may want to give them a spin.

    from segpy.reader import create_reader
    from segpy_numpy.extract import extract_inline_3d    

    with open(segy_filename, 'rb') as segy_file:
        segy_reader = create_reader(segy_file)
        inline_array = extract_inline_3d(segy_reader, inline_number=1, null=0.0)

from segpy.

rth avatar rth commented on August 31, 2024

Great, thanks. I'll have a look.

from segpy.

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.