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

salvus.opt.misfits.phase_misfit

Phase misfit and adjoint sources.

Functions

phase_misfit_and_adjoint_source()

def phase_misfit_and_adjoint_source(
    data_synthetic: numpy.ndarray,
    data_observed: numpy.ndarray,
    sampling_rate_in_hertz: float,
    frequency_limits: Sequence[float],
    absolute_value_threshold: float = 0.001,
    taper_type: str = "hanning",
    plot: bool = False,
) -> Tuple[float, numpy.ndarray]: ...

Compute a phase difference misfit and associated adjoint source.

Parameters
  • data_synthetic numpy.ndarray — Synthetic waveforms.
  • data_observed numpy.ndarray — Observed waveforms.
  • sampling_rate_in_hertz float — Sampling rate.
  • frequency_limits Sequence[float] — Either (f1, f2, f3, f4) or (f2, f3). In the latter case it will set f1 = 0.5 * f2 and f4 = 2 * f3. These are frequency limits for a Fourier domain bandpass filter. Every frequency smaller than f1 and larger than f4 will be completely filtered out, frequencies between f2 and f3 will be fully retained with them being tapered for f1 < f < f2 and f3 < f < f4.
  • absolute_value_threshold float — Only perform the phase difference measurement for frequencies whose absolute value is at least this fraction of the maximum absolute value of all frequencies. This is important because phase measurements for frequencies with little energy would otherwise distort the result and could potentially even dominate it. Frequencies with absolute values smaller than 0.5 * absolute_value_threshold * max_abs_value will be fully muted, those in between both bounds will be tapered.
  • taper_type str — Tapering function to use for the frequency and thresholding tapers. Currently supported are "hanning", "tanh", and "linear".
  • plot bool — Optionally plot some details about the computation. Useful for debugging and tuning.
Returns Tuple[float, numpy.ndarray] — Tuple of misfit value and adjoint source.