Utility Functions

async stride.forward(problem, pde, *args, **kwargs)[source]

Use a problem forward using a given pde. The given args and kwargs will be passed on to the PDE.

Parameters:
  • problem (Problem) – Problem to run the PDE on.

  • pde (Operator) – PDE operator to run for each shot in the problem.

  • dump (bool, optional) – Whether or not to wave to disk the result of the forward run, defaults to True.

  • deallocate (bool, optional) – Whether or not to deallocate the resulting traces after running forward, defaults to False.

  • shot_ids (list, optional) – List of specific shots to run, defaults to all remaining shots.

  • safe (bool, optional) – Whether to discard workers that fail during execution.

  • args (optional) – Extra positional arguments for the PDE.

  • kwargs (optional) – Extra keyword arguments for the PDE.

async stride.adjoint(problem, pde, loss, optimisation_loop, optimiser, *args, **kwargs)[source]

Use a problem forward using a given pde. The given args and kwargs will be passed on to the PDE.

Parameters:
  • problem (Problem) – Problem to run the optimisation on.

  • pde (Operator) – PDE operator to run for each shot in the problem.

  • loss (Operator) – Loss function operator.

  • optimisation_loop (OptimisationLoop) – Optimisation loop.

  • optimiser (LocalOptimiser) – Local optimiser associated with the variable for which we are inverting.

  • num_iters (int, optional) – Number of iterations to run the inversion for.

  • select_shots (dict, optional) – Rules for selecting available shots per iteration, defaults to taking all shots. For details on this see select_shot_ids().

  • dump (bool, optional) – Whether or not to save to disk the updated variable after every iteration.

  • f_min (float, optional) – Min. frequency to filter wavelets and data with. If not given, no high-pass filter is applied.

  • f_max (float, optional) – Max. frequency to filter wavelets and data with. If not given, no low-pass filter is applied.

  • safe (bool, optional) – Whether to discard workers that fail during execution.

  • args (optional) – Extra positional arguments for the operators.

  • kwargs (optional) – Extra keyword arguments for the operators.