Reflectivity.py

This demo shows off the functionality implemented in reflectivity.py, including several amplitude vs. offset implementations, both isotropic and with VTI / HTI anisotropy.

The sliders control the elastic properties above and below the reflecting interface.

To run, click on 'Cell->Run All' in the top menu, then scroll to the bottom and move the sliders around


In [1]:
import bokeh.models
import bokeh.plotting

import IPython.html.widgets

import numpy as np
import rppy.reflectivity as reflectivity

bokeh.plotting.output_notebook()


:0: FutureWarning: IPython widgets are experimental and may change in the future.
BokehJS successfully loaded.

Isotropic and Anisotropic AVO

First we define an offset range (in degrees of incidence at the target), and compute the isotropic reflectivity at those offsets.

We compute the exact Zoeppritz solution, as well as the Aki-Richards, Bortfeld, and 3-term Shuey approximations to the Zoeppritz solution.


In [2]:
theta = np.linspace(0, 80, 1000)
Raki = reflectivity.aki_richards(3000, 1500, 2000, 4000, 2000, 2200, np.radians(theta))
Rbort = reflectivity.bortfeld(3000, 1500, 2000, 4000, 2000, 2200, np.radians(theta))
Rshu = reflectivity.shuey(3000, 1500, 2000, 4000, 2000, 2200, np.radians(theta))
Rzoe = reflectivity.zoeppritz(3000, 1500, 2000, 4000, 2000, 2200, np.radians(theta))
Rvti = reflectivity.ruger_vti(3000, 1500, 2000, 0.0, 0.0, 4000, 2000, 2200, 0.1, 0.2, np.radians(theta))

In [3]:
src_aki = bokeh.models.ColumnDataSource(data=dict(x=theta, y=Raki))
src_bort = bokeh.models.ColumnDataSource(data=dict(x=theta, y=Rbort))
src_shu = bokeh.models.ColumnDataSource(data=dict(x=theta, y=Rshu))
src_zoe = bokeh.models.ColumnDataSource(data=dict(x=theta, y=Rzoe))
src_vti = bokeh.models.ColumnDataSource(data=dict(x=theta, y=Rvti))

p = bokeh.plotting.figure(title="Reflectivity", plot_height=500, plot_width=1000)
p.line(theta, Raki, color="blue", line_width=3, source=src_aki, legend="Aki_Richards")
p.line(theta, Rbort, color="red", line_width=3, source=src_bort, legend="Bortfeld")
p.line(theta, Rshu, color="green", line_width=3, source=src_shu, legend="Shuey")
p.line(theta, Rzoe, color="black", line_width=3, source=src_zoe, legend="Zoeppritz")
p.line(theta, Rvti, color="orange", line_width=3, source=src_vti, legend="Ruger VTI")


Out[3]:
<bokeh.plotting.Figure at 0x5f88ad0>

In [4]:
def update(Vp1=3000, Vs1=1500, p1=2000, Vp2=4000, Vs2=2000, p2=2200, e2=0.1, d2=0.2):
    src_aki.data['y'] = reflectivity.aki_richards(Vp1, Vs1, p1, Vp2, Vs2, p2, np.radians(theta))
    src_bort.data['y'] = reflectivity.bortfeld(Vp1, Vs1, p1, Vp2, Vs2, p2, np.radians(theta))
    src_shu.data['y'] = reflectivity.shuey(Vp1, Vs1, p1, Vp2, Vs2, p2, np.radians(theta))
    src_zoe.data['y'] = reflectivity.zoeppritz(Vp1, Vs1, p1, Vp2, Vs2, p2, np.radians(theta))
    src_vti.data['y'] = reflectivity.ruger_vti(Vp1, Vs1, p1, 0, 0, Vp2, Vs2, p2, e2, d2, np.radians(theta))
    src_aki.push_notebook()
    src_bort.push_notebook()
    src_shu.push_notebook()
    src_zoe.push_notebook()
    src_vti.push_notebook()

In [5]:
bokeh.plotting.show(p)



In [6]:
IPython.html.widgets.interact(update,
                              Vp1=(1500, 4000), Vs1=(1500, 4000), p1=(1650, 2650),
                              Vp2=(1500, 4000), Vs2=(1500, 4000), p2=(1650, 2650),
                              e2=(0,0.2,0.001), d2=(0,0.5,0.001))