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()
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
fCallable — Function computing an adjoint source.extra_kwargsDict — Extra arguments passed to the adjoint source computation function.plotbool =False— Plot the gradient test.seedOptional[int] =None— Optionally pass a seed for the random number generation.
Returns None