Coder Social home page Coder Social logo

Comments (6)

mrava87 avatar mrava87 commented on August 22, 2024

Hi,
what are you planning to cut? Time axis or also restrict IL and XL?

from segyio-notebooks.

doiko avatar doiko commented on August 22, 2024

Hi Matteo, only time axis. We need the header for each trace though.

from segyio-notebooks.

mrava87 avatar mrava87 commented on August 22, 2024

Hi Dimitrios,
then I don't think you can't do anything better than what this notebooks suggests. Make an empty file and fill all header words. As the length of your traces is changed you can't copy the original file and work on a copy, but since you don't want to shrink IL or XL you can't be smarter and try to just to copy a subset of ILs/XLs.

@jokva do you see any other way to make the process faster?

from segyio-notebooks.

doiko avatar doiko commented on August 22, 2024

Thanks Matteo,
Is it possible to loop over the headers and copy them faster one by one?
What we see is that segyio when executing dst.header = segy.header tries to read the complete segy and since the segy is huge the process fails by trying to create a huge swap file.
@alpapapo do you agree on the behavior we notice?

from segyio-notebooks.

mrava87 avatar mrava87 commented on August 22, 2024

Hi,
have you tried dst.header.iline = segy.header.iline as in
https://github.com/equinor/segyio/blob/master/python/examples/copy-sub-cube.py

If the behavior you notice is real (@jokva ?) this may do the copy line by line. Another way is to do it trace by trace

for i in range(segy.tracecount):    
        dst.header[i] = segy.header[i] 
        dst.trace[i]  = segy.trace[i]

but this one is much slower than dst.header= segy.header.

from segyio-notebooks.

doiko avatar doiko commented on August 22, 2024

Hi Matteo,
Thanks for the suggestion, we will check it tomorrow.
Can this be related to issue equinor/segyio#423

from segyio-notebooks.

Related Issues (6)

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.