pygeopressure.velocity package

Submodules

pygeopressure.velocity.conversion module

Routines performing velocity type conversion

pygeopressure.velocity.conversion.avg2int(twt, v_avg)[source]
Parameters
  • twt (1-d ndarray)

  • v_avg (1-d ndarray)

Returns

v_int

Return type

1-d ndarray

pygeopressure.velocity.conversion.int2avg(twt, v_int)[source]
Parameters
  • twt (1-d ndarray)

  • v_int (1-d ndarray)

Returns

v_avg

Return type

1-d ndarray

Notes

\[V_{int}[i](t_{i} - t_{i-1}) = V_{avg}[i] t_{i} - \ V_{avg}[i-1] t_{i-1}\]
pygeopressure.velocity.conversion.int2rms(twt, v_int)[source]
Parameters
  • twt (1-d ndarray)

  • v_int (1-d ndarray)

Returns

v_rms

Return type

1-d ndarray

pygeopressure.velocity.conversion.rms2int(twt, v_rms)[source]

Convert rms velocity to interval velocity

Parameters
  • twt (1-d ndarray) – input two-way-time array, in ms

  • rms (1-d nadarray) – rms velocity array, in m/s

Returns

v_int – interval velocity array with the same length of twt and rms

Return type

1-d ndarray

Notes

This routine uses Dix equation to comput inverval velocity.

\[V_{int}[i]^2 = \frac{V_{rms}[i]^2 t_{i} - V_{rms}[i-1]^2 \ t_{i-1}}{t_{i}-t_{i-1}}\]

twt and rms should be of the same length of more than 2.

Examples

>>> a = np.arange(10)
>>> twt = np.arange(10)
>>> rms2int(twt, a)
array([  0.        ,   1.        ,   2.64575131,   4.35889894,
         6.08276253,   7.81024968,   9.53939201,  11.26942767,
        13.        ,  14.73091986])
pygeopressure.velocity.conversion.twt2depth(twt, v_avg, prop_2_convert, stepDepth=4, startDepth=None, endDepth=None)[source]
Parameters
  • twt (1-d ndarray)

  • v_avg (1-d ndarray)

  • prop_2_convert (1-d ndarray)

  • stepDepth (scalar)

  • startDpeth (optional) (scalar)

  • endDepth (optional) (scalar)

Returns

  • newDepth (1-d ndarray) – new depth array

  • new_prop_2_convert (1-d ndarray) – average velocity in depth domain

pygeopressure.velocity.extrapolate module

Functions relating velocity trend extrapolation

pygeopressure.velocity.extrapolate.normal(x, a, b)[source]

Extrapolate velocity using normal trend.

Parameters
  • x (1-d ndarray) – depth to convert

  • a, b (scalar) – coefficents

Returns

out – esitmated velocity

Return type

1-d ndarray

Notes

\[\log d{t}_{Normal}=a-bz\]

is transformed to

\[v={e}^{bz-a}\]

Note that the exponential relation is unphysical especially in depth bellow the interval within which the equation is calibrated.

References

1

C. Hottmann, R. Johnson, and others, “Estimation of formation pressures from log-derived shale properties,” Journal of Petroleum Technology, vol. 17, no. 6, pp. 717-722, 1965.

pygeopressure.velocity.extrapolate.normal_dt(x, a, b)[source]

normal trend of transit time

Parameters

x (1-d ndarray) – depth to convert

pygeopressure.velocity.extrapolate.normal_log(vel_log, a, b)[source]
Returns

normal velocity log

Return type

Log

pygeopressure.velocity.extrapolate.set_v0(v)[source]

set global variable v0 for slotnick()

pygeopressure.velocity.extrapolate.slotnick(x, k)[source]

Relation between velocity and depth

Parameters
  • x (1-d ndarray) – Depth to convert

  • k (scalar) – velocity gradient

Notes

typical values of velocity gradient k falls in the range 0.6-1.0s-1

References

1

M. Slotnick, “On seismic computations, with applications, I,” Geophysics, vol. 1, no. 1, pp. 9-22, 1936.

pygeopressure.velocity.interpolation module

2-d interpolation routines

pygeopressure.velocity.interpolation.interp_DW(array2d)[source]

2-D distance-weighted interpolation

Parameters

array2d (ndarray) – 2-D ndarray void values being singaled by np.nan

Examples

>>> a = np.array([[2, 2, 2], [2, np.nan, 2], [2, 2, 2]])
>>> b = interp_DW(a)
pygeopressure.velocity.interpolation.spline_1d(twt, vel, step, startTwt=None, endTwt=None, method='cubic')[source]

pygeopressure.velocity.smoothing module

2-d smoothing

pygeopressure.velocity.smoothing.smooth(x, window_len=11, window='hanning')[source]

Smooth the data using a window with requested size.

This method is based on the convolution of a scaled window with the signal. The signal is prepared by introducing reflected copies of the signal (with the window size) in both ends so that transient parts are minimized in the begining and end part of the output signal.

Parameters
  • x (ndarray) – the input signal

  • window_len (scalar) – the dimension of the smoothing window; should be an odd integer.

  • window (scalar) – the type of window from ‘flat’, ‘hanning’, ‘hamming’, ‘bartlett’, ‘blackman’ flat window will produce a moving average smoothing.

Returns

y – the smoothed signal

Return type

ndarray

Examples

>>> t=linspace(-2,2,0.1)
>>> x=sin(t)+randn(len(t))*0.1
>>> y=smooth(x)

See also

numpy.hanning(), numpy.hamming(), numpy.bartlett(), numpy.blackman(), numpy.convolve()

TODO()

the window parameter could be the window itself if an array instead of a string

Notes

length(output) != length(input), to correct this: return y[(window_len/2-1):-(window_len/2)] instead of just y.

pygeopressure.velocity.smoothing.smooth_2d(m)[source]
pygeopressure.velocity.smoothing.smooth_trace(trace_data, window=120)[source]

Module contents