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

salvus.opt.misfits.gradient_test

Functionality to perform a gradient test of adjoint sources.

Functions

gradient_test_adjoint_sources()

def gradient_test_adjoint_sources(
    f: Callable,
    extra_kwargs: Dict,
    plot: bool = False,
    seed: Optional[int] = None,
) -> None:
    ...

Perform a gradient test with a given adjoint source function.

Parameters
  • f Callable — Function computing an adjoint source.
  • extra_kwargs Dict — Extra arguments passed to the adjoint source computation function.
  • plot bool — Plot the gradient test.
  • seed Optional[int] — Optionally pass a seed for the random number generation.
Returns None