Version:

salvus.opt.misfits.graph_space_optimal_transport

salvus.opt.misfits.graph_space_optimal_transport salvus opt misfits graph_space_optimal_transport
Graph-space optimal transport.

Functions

graph_space_optimal_transport_misfit_and_adjoint_source()

Compute a graph-space optimal transport based misfit and adjoint source.
It largely implements it as described here https://doi.org/10.1088/1361-6420/ab206f but uses a different algorithm to solve the assignment problem.
SIGNATURE
def graph_space_optimal_transport_misfit_and_adjoint_source(
    data_synthetic: np.ndarray,
    data_observed: np.ndarray,
    sampling_rate_in_hertz: float,
    p: float,
    max_expected_time_shift: salvus._core.types.float_,
    plot: bool = False,
    return_assignment: bool = False,
) -> (
    tuple[float, np.ndarray] | tuple[float, np.ndarray, np.ndarray, np.ndarray]
): ...
ARGUMENTS
Required
data_synthetic
Type:np.ndarray
Description:
synthetic waveforms.
Required
data_observed
Type:np.ndarray
Description:
observed waveforms.
Required
sampling_rate_in_hertz
Type:float
Description:
Sampling rate.
Required
p
Type:float
Description:
Minkowski p-norm to use for the distance computation in the graph/point-cloud space.
Required
max_expected_time_shift
Type:salvus._core.types.float_
Description:
The maximum expected time shift in seconds.
Optional
plot
Type:bool
Default value:False
Description:
Plot the transport paths and the adjoint source. Very useful for debugging and tuning.
Optional
return_assignment
Type:bool
Default value:False
Description:
Optionally return the distance matrix and the optimal assignment, which is useful for visualizing the optimal transport map.
RETURNS
Return type: tuple[float, np.ndarray] | tuple[float, np.ndarray, np.ndarray, np.ndarray]
tuple of misfit value and adjoint source by default, or a tuple of mifit value, adjoint source, distance matrix and the assignment when return_assignment is True.
PAGE CONTENTS