agilescientific / bruges Goto Github PK
View Code? Open in Web Editor NEWBag of really useful geoscience equations and stuff
Home Page: https://code.agilescientific.com/bruges
License: Apache License 2.0
Bag of really useful geoscience equations and stuff
Home Page: https://code.agilescientific.com/bruges
License: Apache License 2.0
Right now only does 3. Should be easy.
Should maybe just be able to pass in a list of logs.
Calling it a bug.
There's an @
operator in the CoordTransform
class.
There is a matrix inversion inside a loop which is likely going to slow things down. We can rewrite the code as the inverse of one large matrix and avoid the loops. Should be able to extend to an arbitrary number of angles and samples using np.kron.
Just noticed that the module docs pages are empty: https://bruges.readthedocs.io/en/latest/bruges.noise.html
Probably a bug in sphinx. I'll take a look when I get home tonight.
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.
For interval velocities from RMS velocities.
Currently uses:
scipy.fftpack.fft
— bruges/attribute/spectrogram.pyscipy.signal.fftconvolve
— bruges/attribute/energy.py, bruges/util/util.pyscipy.signal.get_window
— bruges/attribute/spectrogram.pyscipy.signal.hilbert
— bruges/filters/wavelets.pyscipy.signal.chirp
— bruges/filters/wavelets.pyscipy.interpolate.interp1d
— bruges/transform/timedepthconv.pyNeed a ray tracing function for 1.5D, 2D and 3D velocity models for offset synthetics.
Add this method to the rockphysics.backus
stuff...
See
Comparison of shear impedances inverted from stacked PS and SS data: Example from Rulison Field, Colorado, ELDAR GULIYEV, Occidental Petroleum Corporation and REINALDO J. MICHELENA, iReservoir.com, p 1388, The Leading Edge, November 2009.
http://www.ireservoir.com/downloads/TLE_PS_Inversion_Nov2009.pdf
We should change the zoeppritz matrix type to complex and check that we get complex reflection coeffs. beyond the critical angle.
The EI equation has some issues:
Also, it could be improved, for example:
The f1
parameter passed to scipy.signal.chirp()
is wrong. Also needs vectorizing properly.
Seems much simpler to use.
There are 2 functions in Fatiando for plotting wiggles and a seismic section. I kinda want to get rid of them because I don't use them and they endup unmaintained. Do you want them in bruges? I'd be happy to submit a PR.
Here is an example: http://www.fatiando.org/dev/gallery/seismic/convolutional_model.html
cc @eusoubrasileiro (the author of that code)
A big job but might help with, e.g. jit.
Passing :) but empty :(
Alessandro's (@aadm) has made a good start on converting Per Avseth's QSI epic into numpy and Matplotlib friendly functions. Could make a good little cookbook / recipe collection for bruges.
http://aadm.github.io/2016-02-12-rock-physics-templates.html
T**alpha-type gain, perhaps in util?
Make a wrapper for convolve so you can make a 3D synthetic from a filter bank on a 2D RC series.
I think it's more convenient to get the wavelets back in the first dimension, so that w[0]
is the first wavelet in the bank.
Matteo got warnings when running Backus, coming from the padded slicing.
Elastic impedance & Normalized Elastic Impedance
see subsurfwiki for equations http://subsurfwiki.org/wiki/Elastic_impedance
A function that computes integrated trace of post-stack seismic amplitude data. Vectorized of course.
Should be able to get a wavelet bank by passing an array of 4-tuples (or similar 2D array) to ormsby
. This works for ricker()
and sweep()
.
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 )
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.
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)
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.
Not sure where to put it... maybe it's just a general utility.
Optionally perhaps.
And tests with doctest.
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.
Looking at the tutorial @kwinkunks recently posted, I noticed that the convolution itself for forward modeling is not implemented in bruges. It's a non-trivial piece of code to apply to multiple traces it would be good to have it in there so we don't have to write np.apply_along_axis
all the time :)
To match our other libraries.
for critical angles to be valid (and for the arcsin to compute), the velocity comparison should be vp1<vp2
and vp1<vs2
Fix the failing tests and cover the rest of the rockphysics
module
We can add to this as we go:
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.
Looking at the code I think there is a 1/2 sample correction in there that isn't actually being helpful.
For example:
Maybe a good idea:
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.