Mondaic
This API reference is not for the latest stable Salvus version.

salvus.project.tools.data_selection.seismology.receiver_weighting

Implementations for a few common receiver weighting schemes used in seismology.

Functions

apply_receiver_weighting()

def apply_receiver_weighting(
    ewws: salvus.flow.collections.event_window_and_weight_set.EventWindowAndWeightSet,
    weighting_chain: List[Dict],
    normalize: bool,
) -> None:
    ...

Entry point to apply a number of receiver weighting functions.

The items in weighting_chain each describe a different weighting function. The weights from all functions/stages are multiplied together to yield the final receiver weight.

Only receivers that do have at least one window on any component will be passed to the weighting functions.

Each item in weighting_chain must be a dictionary of the form:

{
    "weighting_scheme": "name_of_the_schema",
    "function_kwargs": {"extra": "function_arguments"},
}

The "weighting_scheme" can be a function that must accept at least two arguments listed in the following.

  • event: The event objects for which to set weights.
  • receiver: A dictionary of receiver name -> coordinates.

Additionally it can take any number of extra arguments that are passed via the "function_kwargs" key. The function must return a dictionary of receiver name -> receiver weight.

Currently available built-in receiver weighting schemes:

  • "ruan_et_al_2019": See the receiver_weighting_ruan_et_al_2019
    • function for details.
  • "mute_near_source_receivers": See the receiver_weighting_mute_near_source_receivers function for details.
Parameters
  • ewws salvus.flow.collections.event_window_and_weight_set.EventWindowAndWeightSet — The event and window set to apply things to.
  • weighting_chain List[Dict] — A list of dictionaries, each a separate weighting function.
  • normalize bool — If True (recommended) normalize the sum of all weights to be equal to the receiver count after the all weighting functions have been applied.
Returns None

receiver_weighting_mute_near_source_receivers()

def receiver_weighting_mute_near_source_receivers(
    event: salvus.flow.collections.event.Event,
    receivers: Dict,
    minimum_receiver_distance_in_m: float,
    maximum_receiver_mute_distance_in_m: float,
    taper_type: str,
) -> Dict[str, float]:
    ...

Mute near source receivers.

Parameters
  • event salvus.flow.collections.event.Event — Event object.
  • receivers Dict — A dictionary of receiver names to coordinates.
  • minimum_receiver_distance_in_m float — Minimum receiver distance in meters. All receivers closer than this to the source will have zero weight.
  • maximum_receiver_mute_distance_in_m float — All receivers further away than this will not be muted.
  • taper_type str — How to go from weight 0 to weight 1 for receivers in the transition region. Currently only “hanning” is supported.
Returns Dict[str, float] — A dictionary of receiver names to receiver weights.

receiver_weighting_ruan_et_al_2019()

def receiver_weighting_ruan_et_al_2019(
    event: salvus.flow.collections.event.Event,
    receivers: Dict,
    ref_distance_condition_fraction: float,
) -> Dict[str, float]:
    ...

Receiver/station weighting after:

Ruan, Y. et al. (2019) Balancing unevenly distributed data in seismic tomography: a global adjoint tomography example, Geophysical Journal International, Volume 219, Issue 2, https://doi.org/10.1093/gji/ggz356

It will give smaller weights stations in dense cluster and larger weights to isolated stations in an effort to alleviate the uneven station distribution in the real world.

Parameters
  • event salvus.flow.collections.event.Event — Event object.
  • receivers Dict — A dictionary of receiver names to coordinates.
  • ref_distance_condition_fraction float — Used to choose the actual reference distance. The condition number of the diagonal weighting matrix is computed for a large range of possible reference distances. This number is the condition number as a fraction of the maximum condition number whose reference distance should be chosen. Please see the paper for details. A reasonable number seems to be 1.0 / 3.0.
Returns Dict[str, float] — A dictionary of receiver names to receiver weights.