salvus.opt.misfits.gradient_test
salvus.opt.misfits.gradient_test 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: typing.Callable,
extra_kwargs: dict,
plot: bool = False,
seed: int | None = None,
) -> None: ...Perform a gradient test with a given adjoint source function.
Parameters
ftyping.Callable — Function computing an adjoint source.extra_kwargsdict — Extra arguments passed to the adjoint source computation function.plotbool — Plot the gradient test.seedint | None — Optionally pass a seed for the random number generation.
Returns None
gradient_test_block_adjoint_sources()
gradient_test_block_adjoint_sources()def gradient_test_block_adjoint_sources(
f: typing.Callable,
extra_kwargs: dict | None = None,
plot: bool = False,
seed: int | None = None,
) -> None: ...Perform a gradient test with a given block adjoint source function.
This is the same as the gradient_test_adjoint_sources function but for a
block of a few traces instead of just one.
Parameters
ftyping.Callable — Function computing an adjoint source.extra_kwargsdict | None — Extra arguments passed to the adjoint source computation function.plotbool — Plot the gradient test.seedint | None — Optionally pass a seed for the random number generation.
Returns None