Giter VIP home page Giter VIP logo

bruges's Introduction

bruges is a

Bruges

In other words, it's just a load of functions that implement important equations in (mostly seismic) geophysics, from Aki-Richards to Zoeppritz.

Run tests Build docs PyPI version PyPI versions PyPI license

Quick start

Install with:

pip install bruges

Make a trapezoidal wavelet like:

import bruges as bg
w, t = bg.filters.ormsby(duration=0.256, dt=0.002, f=[5, 10, 40, 80])

This produces two arrays: amplitude w and time t.

Links

Bruges rooves

bruges's People

Contributors

aadm avatar agordonf avatar ben-bougher avatar edf1 avatar evanbianco avatar guoyinzh avatar hyperiongeo avatar jesperdramsch avatar jessepisel avatar kinverarity1 avatar kwinkunks avatar leouieda avatar mtb-za avatar mycarta avatar thomasmgeo avatar victorfavela avatar vkazei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bruges's Issues

Sequence length affects Ricker amplitude

I have been using the Ricker wavelet function and noticed that you get a different sample representation of the wavelet depending on whether you end up with an odd or even number of samples in the output.

That seems like strange behaviour, I would expect a consistent sample representation and just to get an additional zero sample in the sequence. It does affect the wavelet produced, as far as amplitude is concerned, you get a slightly higher amplitude wavelet than you bargained for.

See:
https://github.com/stevejpurves/geoscribbles/blob/master/notebooks/Ricker_with_odd_or_even_samples.ipynb

Looking at the code I think there is a 1/2 sample correction in there that isn't actually being helpful.

More useful time-depth conversion

This module should be refactored.

It does not tolerate NaNs in the t-d function, eg if you pass a Vp curve with Nans in it.

I'd like to be able to look up times and depths singly.

Tidy up wavelets, filters, kernels

Sorting out the confusing 'layout' of wavelets, kernels, and filter functions. Wavelets, which are really just 1D kernels, should also be available as 2D kernels.

Vectorize all equations

Not sure yet how many equations this affects, but we should vectorize all of them.

For example, you should be able to pass Vp, Vs, RHOB logs of length m to the reflectivity equations, plus a 1D array of incidence angles of length n, and get back an m × n array of impedances.

Density-porosity from Bulk Density

Function should look something like this,

    """converts bulk density into 'density porosity' based 
        on a given matrix density (Rho_matrix)
        Rho_matrix (sandstone) : 2.65 g/cc
        Rho_matrix (Limestome): 2.71 g/cc
        Rho_matrix (Dolomite): 2.876 g/cc
        Rho_matrix (Anyhydrite): 2.977 g/cc
        Rho_matrix (Salt): 2.032 g/cc

        Rho_fluid (fresh water): 1.0 g/cc (is this more mud-like?)
        Rho_fluid (salt water): 1.1 g/cc
        see wiki.aapg.org/Density-neutron_log_porosity
        returns density porosity log """
        
       # put some code here to check that everything is in SI units or at 
       # least check that Rho_matrix, RHOB, AND Rho_fluid, have the same units

        return ( Rho_matrix - RHOB ) / (Rho_matrix - Rho_fluid )

http://wiki.aapg.org/Density-neutron_log_porosity

blangy parameters upside-down!

Guys you should check the way you pass parameters to bruges.anisotropy.blangy, because right now the first set of parameters (vp0, vs0 and rho0) are assigned to the lower medium and the second set to the upper medium -- and this is the opposite to all the other equations like bruges.reflection.akirichards etc. where you assign the first set of parameters to the upper medium.

EI equation problems

The EI equation has some issues:

  • It doesn't work on multi-dimensional input.
  • Normalization doesn't work as expected.

Also, it could be improved, for example:

  • Let user change K.
  • Let user choose to use sin or tan for the alpha term.

Rockphysics tests

Fix the failing tests and cover the rest of the rockphysics module

complex reflectivity from Zoep.

We should change the zoeppritz matrix type to complex and check that we get complex reflection coeffs. beyond the critical angle.

Add Blangy's AVO equation to agilegeo.avo

After Matt's blog post I wanted to use Blangy's equation to do some anisotropic AVO modeling. I think it would be pretty easy to add it to agilegeo.avo:

def blangy(vp1,vs1,rho1,d1,e1,vp2,vs2,rho2,d2,e2,theta):
    inc_angle = np.radians(theta)
    trans_angle = np.arcsin(np.sin(inc_angle) * vp2/vp1)
    theta = 0.5 * (inc_angle + trans_angle)
    vp  = (vp1 + vp2)/2.0
    vs  = (vs1 + vs2)/2.0
    rho  = (rho1 + rho2)/2.0
    dvp = vp2-vp1
    dvs = vs2-vs1
    drho = rho2-rho1
    dd = d2-d1
    de = e2-e1
    A = 0.5 * (drho/rho + dvp/vp)
    B = 2.0 * (vs**2 / vp**2) * ((drho/rho + 2 * dvs/vs)) * np.sin(theta)**2
    C = 0.5 * (dvp/vp) * np.tan(theta)**2
    D = 0.5 * dd * np.sin(theta)**2
    E = 0.5 * (dd - de) * np.sin(theta)**2 * np.tan(theta)**2
    isotropic = A - B + C
    anisotropic = A - B + C + D - E
    return isotropic, anisotropic, (A, -B, C, D, -E)

Equation wishlist

We can add to this as we go:

New

  • Leo's NMO eqn
  • tau-p
  • Evan's wavelet estimation tutorial
  • some simple curve estimation/fill-in (without scikit)
  • coloured inversion
  • Dix and inverse Dix
  • Random stuff from Ross Crain's collection

Need improvement

  • better / easier specdecomp, with some new algos (at least S-transform)
  • better time-depth conversion

Remove `scipy` dependency

Currently uses:

  • scipy.fftpack.fft — bruges/attribute/spectrogram.py
  • scipy.signal.fftconvolve — bruges/attribute/energy.py, bruges/util/util.py
  • scipy.signal.get_window — bruges/attribute/spectrogram.py
  • scipy.signal.hilbert — bruges/filters/wavelets.py
  • scipy.signal.chirp — bruges/filters/wavelets.py
  • scipy.interpolate.interp1d — bruges/transform/timedepthconv.py

Add RC series helper function

Add a function to the reflection module to make it easier to construct a reflectivity series for a set of logs.

Needs #38 to be sensible.

Trace AGC

T**alpha-type gain, perhaps in util?

Sample data in bruges.data

For example:

  • Download a couple of open seismic datasets.
  • Maybe a couple of wells, ideally on the seismic, ideally with elastic properties.

Maybe a good idea:

  • Use TQDM
  • Allow downloading subsets?
  • Prolly best to use npy formats directly? SEG-Y might be bad idea, esp since no reader in bruges.

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.