# examples.seismic.acoustic package¶

## examples.seismic.acoustic.acoustic_example module¶

examples.seismic.acoustic.acoustic_example.acoustic_setup(shape=(50, 50, 50), spacing=(15.0, 15.0, 15.0), tn=500.0, kernel='OT2', space_order=4, nbpml=10, constant=False, **kwargs)[source]
examples.seismic.acoustic.acoustic_example.run(shape=(50, 50, 50), spacing=(20.0, 20.0, 20.0), tn=1000.0, space_order=4, kernel='OT2', nbpml=40, full_run=False, autotune=False, constant=False, checkpointing=False, **kwargs)[source]

## examples.seismic.acoustic.operators module¶

examples.seismic.acoustic.operators.AdjointOperator(model, source, receiver, space_order=4, kernel='OT2', **kwargs)[source]

Constructor method for the adjoint modelling operator in an acoustic media

Parameters: model – Model object containing the physical parameters source – PointData object containing the source geometry receiver – PointData object containing the acquisition geometry time_order – Time discretization order space_order – Space discretization order
examples.seismic.acoustic.operators.BornOperator(model, source, receiver, space_order=4, kernel='OT2', **kwargs)[source]

Constructor method for the Linearized Born operator in an acoustic media

Parameters: model – Model object containing the physical parameters source – PointData object containing the source geometry receiver – PointData object containing the acquisition geometry time_order – Time discretization order space_order – Space discretization order
examples.seismic.acoustic.operators.ForwardOperator(model, source, receiver, space_order=4, save=False, kernel='OT2', **kwargs)[source]

Constructor method for the forward modelling operator in an acoustic media

Parameters: model – Model object containing the physical parameters source – PointData object containing the source geometry receiver – PointData object containing the acquisition geometry space_order – Space discretization order save – Saving flag, True saves all time steps, False only the three
examples.seismic.acoustic.operators.GradientOperator(model, source, receiver, space_order=4, save=True, kernel='OT2', **kwargs)[source]

Constructor method for the gradient operator in an acoustic media

Parameters: model – Model object containing the physical parameters source – PointData object containing the source geometry receiver – PointData object containing the acquisition geometry time_order – Time discretization order space_order – Space discretization order
examples.seismic.acoustic.operators.iso_stencil(field, m, s, damp, kernel, **kwargs)[source]

Stencil for the acoustic isotropic wave-equation: u.dt2 - H + damp*u.dt = 0 :param field: Symbolic TimeFunction object, solution to be computed :param m: square slowness :param s: symbol for the time-step :param damp: ABC dampening field (Function) :param kwargs: forwad/backward wave equation (sign of u.dt will change accordingly as well as the updated time-step (u.forwad or u.backward) :return: Stencil for the wave-equation

examples.seismic.acoustic.operators.laplacian(field, m, s, kernel)[source]

Spacial discretization for the isotropic acoustic wave equation. For a 4th order in time formulation, the 4th order time derivative is replaced by a double laplacian: H = (laplacian + s**2/12 laplacian(1/m*laplacian)) :param field: Symbolic TimeFunction object, solution to be computed :param m: square slowness :param s: symbol for the time-step :return: H

## examples.seismic.acoustic.wavesolver module¶

class examples.seismic.acoustic.wavesolver.AcousticWaveSolver(model, source, receiver, kernel='OT2', space_order=2, **kwargs)[source]

Bases: object

Solver object that provides operators for seismic inversion problems and encapsulates the time and space discretization for a given problem setup.

Parameters: model – Physical model with domain parameters source – Sparse point symbol providing the injected wave receiver – Sparse point symbol describing an array of receivers time_order – Order of the time-stepping scheme (default: 2, choices: 2,4) time_order=4 will not implement a 4th order FD discretization of the time-derivative as it is unstable. It implements instead a 4th order accurate wave-equation with only second order time derivative. Full derivation and explanation of the 4th order in time can be found at: http://www.hl107.math.msstate.edu/pdfs/rein/HighANM_final.pdf space_order – Order of the spatial stencil discretisation (default: 4)

Note: space_order must always be greater than time_order

adjoint(rec, srca=None, v=None, m=None, **kwargs)[source]

Adjoint modelling function that creates the necessary data objects for running an adjoint modelling operator.

Parameters: rec – Symbol with stored receiver data. Please note that these act as the source term in the adjoint run. srca – Symbol to store the resulting data for the interpolated at the original source location. v – (Optional) Symbol to store the computed wavefield m – (Optional) Symbol for the time-constant square slowness Adjoint source, wavefield and performance summary
born(dmin, src=None, rec=None, u=None, U=None, m=None, **kwargs)[source]

Linearized Born modelling function that creates the necessary data objects for running an adjoint modelling operator.

Parameters: src – Symbol with time series data for the injected source term rec – Symbol to store interpolated receiver data u – (Optional) Symbol to store the computed wavefield U – (Optional) Symbol to store the computed wavefield m – (Optional) Symbol for the time-constant square slowness
forward(src=None, rec=None, u=None, m=None, save=None, **kwargs)[source]

Forward modelling function that creates the necessary data objects for running a forward modelling operator.

Parameters: src – Symbol with time series data for the injected source term rec – Symbol to store interpolated receiver data u – (Optional) Symbol to store the computed wavefield m – (Optional) Symbol for the time-constant square slowness save – Option to store the entire (unrolled) wavefield Receiver, wavefield and performance summary
gradient(rec, u, v=None, grad=None, m=None, checkpointing=False, **kwargs)[source]

Gradient modelling function for computing the adjoint of the Linearized Born modelling function, ie. the action of the Jacobian adjoint on an input data.

Parameters: recin – Receiver data as a numpy array u – Symbol for full wavefield u (created with save=True) v – (Optional) Symbol to store the computed wavefield grad – (Optional) Symbol to store the gradient field Gradient field and performance summary
op_adj()[source]

op_born()[source]

Cached operator for born runs

op_fwd(save=None)[source]

Cached operator for forward runs with buffered wavefield

op_grad(save=True)[source]