relmt.mt module#

Functions to set up and solve the linear systems

relmt.mt.correlation(M1, M2)[source]#

P and S correlation coefficients between two moment tensors

Implements Equation 5 of Kuge and Kawakatsu (1993, PEPI)

Parameters:
  • M1 (MT) – The two moment tensors to compare

  • M2 (MT) – The two moment tensors to compare

Returns:

tuple[float, float]Correlation coefficients for the P-SV and SH system

relmt.mt.kagan_angle(mt1, mt2)[source]#

Given two moment tensors, return the Kagan angle in degrees.

..note: Implementation curtesy of pyrocko.moment_tensor.kagan_angle()

After Kagan (1991) and Tape & Tape (2012).

Parameters:
Return type:

float

relmt.mt.kagan_rms(mt_list, mt_true=None)[source]#

RMS of the kagan angles between MTs

Parameters:
  • mt_list (list[MT] | dict[int, list[MT]]) – List of MT observations to compare, or dict of lists

  • mt_true (MT | dict[int, MT] | None) – A true MT from which to compute deviation. If None, use mean of mt_list

Returns:

float | dict[int, float]RMS of the kagan angles

relmt.mt.magnitude_of_moment(moment)[source]#

Magnitude of a seismic moment

Parameters:

moment (float)

Return type:

float

relmt.mt.magnitude_of_vector(vector)[source]#

Magnitude of a moment tensor in 6-element vector notation

Parameters:

vector (MT | tuple)

Return type:

float

relmt.mt.mean_moment(mts)[source]#

Mean seismic moment of list of moment tensors

Parameters:

mts (list[MT])

Return type:

float

relmt.mt.moment_of_magnitude(magnitude)[source]#

Seismic moment of a magnitude

Parameters:

magnitude (float)

Return type:

float

relmt.mt.moment_of_tensor(mt_arr)[source]#

Seismic moment of a moment tensor

Parameters:

mt_arr (ndarray)

Return type:

float

relmt.mt.moment_of_vector(m)[source]#

Seismic moment of tensor in 6-element vector notation

For arrays, sum moment along last dimension and return array of moments

Parameters:

m (ndarray | MT)

Return type:

float | ndarray

relmt.mt.mt_array(mt)[source]#

Return 3x3 array representation of moment tensor

Parameters:

mt (MT | ndarray)

Return type:

ndarray

relmt.mt.mt_tuple(mt_arr)[source]#

Return tuple representation of 3x3 moment tensor array

Parameters:

mt_arr (ndarray)

Return type:

MT

relmt.mt.mt_tuples(mt_vec, mt_constraint)[source]#

Return tuple representations of moment tensor vector.

Parameters:
Return type:

list[MT]

relmt.mt.ned2rtf(mnn, mee, mdd, mne, mnd, med)[source]#

Convert moment tensor in north-east-down coordinates to r (up), t (south), f (east)

Parameters:
Return type:

tuple[float, float, float, float, float, float]

relmt.mt.norm_rms(mt_list, mt_true=None)[source]#

Normalized RMS misfit of MTs

Parameters:
  • mt_list (list[MT] | dict[int, list[MT]]) – List of MT observations to compare, or dict of lists

  • mt_true (MT | None) – A true MT from which to compute deviation. If None, use mean of mt_list

Returns:

float | dict[int, float]normalized root-mean-square misfit

relmt.mt.norm_scalar_product(M1, M2)[source]#

Return the normalized scalar product of two moment tensors

See Michael (1987, JGR) Eq. 1 for motivation

Parameters:
Return type:

float

relmt.mt.p_radiation(M, azi, plu, dist, rho, alpha, only_first=False)[source]#

P radiation pattern of a moment tensor M

Parameters:
  • M (ndarray) – (3,3) moment tensor (Nm)

  • azi (float) – Source to receiver azimuth in degree E of N

  • inc – Source to receiver ray plunge in degreen down from horizontal

  • dist (float) – Source to Receiver distance (m)

  • rho (float) – Density of the medium (kg m^-3)

  • alpha (float) – P-wave velocity of the medim (m/s)

  • only_first (bool) – If True, only return the first component of the displacement vector

  • plu (float)

Returns:

ndarray(3,) (or (1,) when only_first=True) displacement vector at receiver

relmt.mt.rtf2ned(mrr, mtt, mff, mrt, mrf, mtf)[source]#

Convert moment tensor in r (up), t (south), f (east) coordinates to north-east-down

Parameters:
Return type:

tuple[float, float, float, float, float, float]

relmt.mt.s_radiation(M, azi, plu, dist, rho, beta)[source]#

S radiation pattern of a moment tensor M

Parameters:
  • M (ndarray) – (3, 3) moment tensor (Nm)

  • azi (float) – Source to receiver azimuth in degree E of N

  • inc – Source to receiver ray plunge in degreen down from horizontal

  • dist (float) – Source to Receiver distance (m)

  • rho (float) – Density of the medium (kg m^-3)

  • beta (float) – S-wave velocity of the medim (m/s)

  • plu (float)

Returns:

ndarray(3,) displacement vector at receiver