Tsumaps database (dataset)

dataset.tsumaps

load(fn=None)[source]

Load tsumaps mat file into dictionary.

The tsumaps mat file stored in siria.data is loaded. The dictionary which is returned has three keys:

Name

Size

Description

'latlon'

(No points, 2)

coordinates of each grid point in lat, lon.

'fm'

(No focal mecs, 3)

first nodal plane orientation for used focal mechanisms
in strike, dip, rake.

'prob'

(No points, No focal mecs)

probabilities for each given focal mechanism nodal plane
orientation at each point of the grid.
rtype

dict of ndarray

returns

Dictionary with latlon (geographical coordinates lat, lon in [deg] of each point), fm (first nodal plane orientaion for used focal mechanisms with columns being strike, dip and rake) and prob (Probabilities for each given focal mechanism nodal plane orientation at each point of the grid).

get_probs(lat, lon, interpolation='nearest_neighbor', cumulative_probability_max=None, probability_gradient_min=None, nmodels_max=None, *args, **kwargs)[source]

Get tsumap focal mechanism probabilites at a given location.

Parameters
  • lat (float) – Latitude of the chosen point in [deg].

  • lon (float) – Longitude of the chosen point in [deg].

  • interpolation (optional, str) –

    Interpolation method to get probabilities at lat, lon. Choices are:
    • nearest_neighbor

    • multilinear.

  • cumulative_probability_max (optional, float) – Return sorted models needed to exceed the given cumulative probability.

  • probability_gradient_min (optional, float) – Return sorted models needed to undercut the given proability gradient.

  • nmodels_max (optional, int) – Return only the given number of most probable models.

Returns

Focal mechanism nodal plane orientations (strike, dip, rake) and the corresponding interpolated probabilities. The sum of all probabilites is 1, if not giving any further constraint.

Return type

ndarray, size: (No focal mecs, 3), ndarray, size: (No focal mecs, )

get_probs_at_nodes(lat=None, lon=None, wesn=None, *args, **kwargs)[source]

Get tsumap focal mechanism probabilites at grid node point(s).

Parameters
  • lat (optional, float) – Latitude of the chosen point in [deg].

  • lon (optional, float) – Longitude of the chosen point in [deg].

  • wesn (optional, tuple(float, float, float, float)) – Rectangle bounding the region as (west, east, south, north) in [deg].

Returns

Iterator of: - The grid node location as (lat, lon) in [deg] - Focal mechanism nodal plane orientations (strike, dip, rake) and - the corresponding interpolated probabilities.

Return type

ndarray, size: (2, ), ndarray, size: (No focal mecs, 3), ndarray, size: (No focal mecs, )

sample_probs_from_distribution(points, interpolation='nearest', rstate=None)[source]

Sample probabilities from individual Kernel Density Estimates.

Individual KDE are determined for strike, dip and rake based on the closest point(s) of the NEAMTHM18 TSUMAPS database. For the quadratic interpolation the four closest data nodes are taken into account with a respective weighting of 1/d^2.

Parameters
  • points (ndarray, size (npoints, 4)) – Locations of points, where samples shall be drawn. Location are given by latitude and longitude in [deg] and north and east shift in [m].

  • interpolation (optional, str) – If nearest, samples are drawn from data of the closest TSUMAPS node. If quadratic, samples are drawn from a mixing distribution consisting of the distance weighted data of the four closest nodes. The weighting factor is 1 / {distance^2}.

  • rstate (RandomState) – Random state used for sampling.

Returns

Samples from the distribution with strikes, dips and rakes.

Return type

ndarray, size (npoints, 3)