Code Monkey home page Code Monkey logo

segpy's Introduction

Segpy 2

Segpy is open source software created by Sixty North and licensed under the GNU Affero General Public License.

Alternative commercial license terms are available from Sixty North AS if you wish to redistribute Segpy as part of a proprietary closed source product or deliver software software-as-a-service (SaaS) using Segpy as part of a proprietary closed source service.

Status

Build status:

https://travis-ci.org/sixty-north/segpy.svg?branch=master Documentation Status https://coveralls.io/repos/github/sixty-north/segpy/badge.svg?branch=master

Installation

The segpy package is available on the Python Package Index (PyPI):

The package supports Python 3 only. To install:

$ pip install segpy

What is Segpy?

The SEG-Y file format is one of several standards developed by the Society of Exploration Geophysicists for storing geophysical seismic data. It is an open standard, and is controlled by the SEG Technical Standards Committee, a non-profit organization.

This project aims to implement an open SEG-Y module in Python 3 for transporting seismic data between SEG-Y files and Python data structures in pure Python.

Basic Usage

Here's a short example which converts non-standard little-endian SEG-Y to standard big-endian SEG-Y:

from segpy.reader import create_reader
from segpy.writer import write_segy

with open('seismic_little.sgy', 'rb') as segy_in_file:
    # The seg_y_dataset is a lazy-reader, so keep the file open throughout.
    seg_y_dataset = create_reader(segy_in_file, endian='<')  # Non-standard Rev 1 little-endian
    print(seg_y_dataset.num_traces())
    # Write the seg_y_dataset out to another file, in big-endian format
    with open('seismic_big.sgy', 'wb') as segy_out_file:
        write_segy(segy_out_file, seg_y_dataset, endian='>')  #  Standard Rev 1 big-endian

The create_reader() function creates Dataset which lazily fetches traces from the file, which is why the file must stay open for read for the duration of use of this dataset. We override the default endian paramers, to specify that the SEG-Y file we're reading is in non-standard little-endian byte order. On the last line of the example we write the Dataset out to a different file, this time with standard compliant big-endian byte order. Note that the input file must remain open as the write_segy() will only request one trace at a time from the input dataset. This means overal memory usage is very low, and the program can handle arbitrarily large SEG-Y files.

Contributing

The easiest way to contribute is to use Segpy submit reports for defects or any other issues you come across. Please see CONTRIBUTING.rst for more details.

Development

Segpy was created by โ€“ and to meet the needs of โ€“ Sixty North. If you require additional features, improved performance, portability to earlier versions of Python, or specific defects fixed (such defects are marked 'unfunded' in the GitHub issue tracker) Sixty North's experienced Segpy maintainers may be available to perform funded development work. Enquire with Sixty North at http://sixty-north.com.

Segpy Versions

Segpy 2.0 is a complete re-imagining of a SEG-Y reader in Python 3 and represents a complete break from any and all older versions of Segpy. No attempt has been made to maintain API compatibility with earlier versions of Segpy and no code is shared across versions. Although earlier versions of Segpy were open source, they were never 'released' as such. Earlier versions of Segpy are deprecated and completely unsupported.

Development

Deployment

$ pip install -e .[dev] $ bumpversion minor $ python setup.py sdist bdist_wheel $ twine upload --config-file <path>/sixty-north.pypirc dist/* $ git push origin

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.