Ejemplo n.º 1
0
 def test_youngspr(self):
     self.assertAlmostEqual(m.vp(youngs=youngs, pr=pr, rho=rho),
                            vp, places=2)
     self.assertAlmostEqual(m.mu(youngs=youngs, pr=pr), mu, places=-2)
     self.assertAlmostEqual(m.lam(youngs=youngs, pr=pr), lam, places=-2)
     self.assertAlmostEqual(m.bulk(youngs=youngs, pr=pr), bulk, places=-2)
     self.assertAlmostEqual(m.pmod(youngs=youngs, pr=pr), pmod, places=-2)
Ejemplo n.º 2
0
def backus_parameters(vp, vs, rho, lb, dz):
    """
    Backus parameters.

    Liner, C (2014), Long-wave elastic attenuation produced by horizontal
        layering. The Leading Edge, June 2014, p 634-638.

    """
    lam = moduli.lam(vp, vs, rho)
    mu = moduli.mu(vp, vs, rho)

    # Compute the layer parameters from Liner (2014) equation 2:
    a = rho * np.power(vp, 2.0)  # Acoustic impedance

    # Compute the Backus parameters from Liner (2014) equation 4:
    A1 = 4 * moving_average(mu * (lam + mu) / a, lb / dz, mode='same')
    A = A1 + np.power(moving_average(lam/a, lb/dz, mode='same'), 2.0)\
        / moving_average(1.0/a, lb/dz, mode='same')
    C = 1.0 / moving_average(1.0 / a, lb / dz, mode='same')
    F = moving_average(lam/a, lb/dz, mode='same')\
        / moving_average(1.0/a, lb/dz, mode='same')
    L = 1.0 / moving_average(1.0 / mu, lb / dz, mode='same')
    M = moving_average(mu, lb / dz, mode='same')

    return A, C, F, L, M
Ejemplo n.º 3
0
def backus_parameters(vp, vs, rho, lb, dz):
    """
    Backus parameters.

    Liner, C (2014), Long-wave elastic attenuation produced by horizontal
        layering. The Leading Edge, June 2014, p 634-638.

    """
    lam = moduli.lam(vp, vs, rho)
    mu = moduli.mu(vp, vs, rho)

    # Compute the layer parameters from Liner (2014) equation 2:
    a = rho * np.power(vp, 2.0)  # Acoustic impedance

    # Compute the Backus parameters from Liner (2014) equation 4:
    A1 = 4 * moving_average(mu*(lam+mu)/a, lb/dz, mode='same')
    A = A1 + np.power(moving_average(lam/a, lb/dz, mode='same'), 2.0)\
        / moving_average(1.0/a, lb/dz, mode='same')
    C = 1.0 / moving_average(1.0/a, lb/dz, mode='same')
    F = moving_average(lam/a, lb/dz, mode='same')\
        / moving_average(1.0/a, lb/dz, mode='same')
    L = 1.0 / moving_average(1.0/mu, lb/dz, mode='same')
    M = moving_average(mu, lb/dz, mode='same')

    return A, C, F, L, M
Ejemplo n.º 4
0
 def test_vpvs(self):
     self.assertAlmostEqual(m.youngs(vp=vp, vs=vs, rho=rho),
                            youngs, places=-2)
     self.assertAlmostEqual(m.mu(vp=vp, vs=vs, rho=rho), mu, places=-2)
     self.assertAlmostEqual(m.pr(vp=vp, vs=vs, rho=rho), pr)
     self.assertAlmostEqual(m.lam(vp=vp, vs=vs, rho=rho), lam, places=-2)
     self.assertAlmostEqual(m.bulk(vp=vp, vs=vs, rho=rho), bulk, places=-2)
     self.assertAlmostEqual(m.pmod(vp=vp, vs=vs, rho=rho), pmod, places=-2)
Ejemplo n.º 5
0
def backus_parameters(vp, vs, rho, lb, dz):
    """
    Intermediate parameters for Backus averaging. This is expected to be a
    private function. You probably want backus() and not this.

    Args:
        vp (ndarray): P-wave interval velocity.
        vs (ndarray): S-wave interval velocity.
        rho (ndarray): Bulk density.
        lb (float): The Backus averaging length in m.
        dz (float): The depth sample interval in m.

    Returns:
        tuple: Liner's 5 intermediate parameters: A, C, F, L and M.

    Notes:
        Liner, C (2014), Long-wave elastic attenuation produced by horizontal
        layering. The Leading Edge, June 2014, p 634-638.

    """
    lam = moduli.lam(vp, vs, rho)
    mu = moduli.mu(vp, vs, rho)

    # Compute the layer parameters from Liner (2014) equation 2:
    a = rho * np.power(vp, 2.0)  # Acoustic impedance

    # Compute the Backus parameters from Liner (2014) equation 4:
    A1 = 4 * moving_average(mu * (lam + mu) / a, lb / dz, mode='same')
    A = A1 + np.power(moving_average(lam/a, lb/dz, mode='same'), 2.0)\
        / moving_average(1.0/a, lb/dz, mode='same')
    C = 1.0 / moving_average(1.0 / a, lb / dz, mode='same')
    F = moving_average(lam/a, lb/dz, mode='same')\
        / moving_average(1.0/a, lb/dz, mode='same')
    L = 1.0 / moving_average(1.0 / mu, lb / dz, mode='same')
    M = moving_average(mu, lb / dz, mode='same')

    BackusResult = namedtuple('BackusResult', ['A', 'C', 'F', 'L', 'M'])
    return BackusResult(A, C, F, L, M)
Ejemplo n.º 6
0
def backus_parameters(vp, vs, rho, lb, dz):
    """
    Intermediate parameters for Backus averaging. This is expected to be a
    private function. You probably want backus() and not this.

    Args:
        vp (ndarray): P-wave interval velocity.
        vs (ndarray): S-wave interval velocity.
        rho (ndarray): Bulk density.
        lb (float): The Backus averaging length in m.
        dz (float): The depth sample interval in m.

    Returns:
        tuple: Liner's 5 intermediate parameters: A, C, F, L and M.

    Notes:
        Liner, C (2014), Long-wave elastic attenuation produced by horizontal
        layering. The Leading Edge, June 2014, p 634-638.

    """
    lam = moduli.lam(vp, vs, rho)
    mu = moduli.mu(vp, vs, rho)

    # Compute the layer parameters from Liner (2014) equation 2:
    a = rho * np.power(vp, 2.0)  # Acoustic impedance

    # Compute the Backus parameters from Liner (2014) equation 4:
    A1 = 4 * moving_average(mu*(lam+mu)/a, lb/dz, mode='same')
    A = A1 + np.power(moving_average(lam/a, lb/dz, mode='same'), 2.0)\
        / moving_average(1.0/a, lb/dz, mode='same')
    C = 1.0 / moving_average(1.0/a, lb/dz, mode='same')
    F = moving_average(lam/a, lb/dz, mode='same')\
        / moving_average(1.0/a, lb/dz, mode='same')
    L = 1.0 / moving_average(1.0/mu, lb/dz, mode='same')
    M = moving_average(mu, lb/dz, mode='same')

    BackusResult = namedtuple('BackusResult', ['A', 'C', 'F', 'L', 'M'])
    return BackusResult(A, C, F, L, M)