Version:

salvus.project.tools.data_selection.seismology.receiver_weighting

salvus.project.tools.data_selection.seismology.receiver_weighting salvus project tools data_selection seismology receiver_weighting
Implementations for a few common receiver weighting schemes used in seismology.

Functions

apply_receiver_weighting()

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:
SIGNATURE
def apply_receiver_weighting(
    ewws: EventWindowAndWeightSet, weighting_chain: list[dict], normalize: bool
) -> None: ...
ARGUMENTS
Required
ewws
Type:EventWindowAndWeightSet
Description:
The event and window set to apply things to.
Required
weighting_chain
Type:list[dict]
Description:
A list of dictionaries, each a separate weighting function.
Required
normalize
Type:bool
Description:
If True (recommended) normalize the sum of all weights to be equal to the receiver count after the all weighting functions have been applied.

receiver_weighting_mute_near_source_receivers()

Mute near source receivers.
SIGNATURE
def receiver_weighting_mute_near_source_receivers(
    event: Event,
    receivers: dict,
    minimum_receiver_distance_in_m: float,
    maximum_receiver_mute_distance_in_m: float,
    taper_type: str,
) -> dict[str, float]: ...
ARGUMENTS
Required
event
Type:Event
Description:
Event object.
Required
receivers
Type:dict
Description:
A dictionary of receiver names to coordinates.
Required
minimum_receiver_distance_in_m
Type:float
Description:
Minimum receiver distance in meters. All receivers closer than this to the source will have zero weight.
Required
maximum_receiver_mute_distance_in_m
Type:float
Description:
All receivers further away than this will not be muted.
Required
taper_type
Type:str
Description:
How to go from weight 0 to weight 1 for receivers in the transition region. Currently only "hanning" is supported.
RETURNS
Return type: dict[str, float]
A dictionary of receiver names to receiver weights.

receiver_weighting_ruan_et_al_2019()

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.
SIGNATURE
def receiver_weighting_ruan_et_al_2019(
    event: Event, receivers: dict, ref_distance_condition_fraction: float
) -> dict[str, float]: ...
ARGUMENTS
Required
event
Type:Event
Description:
Event object.
Required
receivers
Type:dict
Description:
A dictionary of receiver names to coordinates.
Required
ref_distance_condition_fraction
Type:float
Description:
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
Return type: dict[str, float]
A dictionary of receiver names to receiver weights.
PAGE CONTENTS