FrequencyModeling¶
-
class
pysit.modeling.
FrequencyModeling
(solver)[source]¶ Bases:
object
Attributes Summary
modeling_type
solver_type
Methods Summary
adjoint_model
(self, shot, m0, …[, …])Solves for the adjoint field in frequency. adjoint_model_list
(self, shots_list, m0, …)Solves for the adjoint field in frequency. forward_model
(self, shot, m0, frequencies[, …])Applies the forward model to the model for the given solver. forward_model_list
(self, shot_list, m0, …)Applies the forward model to the model for the given solver and severals shots linear_forward_model
(self, shot, m0, m1, …)Applies the forward model to the model for the given solver. linear_forward_model_kappa
(self, shot, m0, …)Applies the forward model to the model for the given solver in terms of a pertubation of kappa linear_forward_model_rho
(self, shot, m0, m1, …)Applies the forward model to the model for the given solver in terms of a pertubation of rho migrate_shot
(self, shot, m0, …[, …])Performs migration on a single shot. migrate_shot_list
(self, shots_list, m0, …)Performs migration a list of shot shot. Attributes Documentation
-
modeling_type
¶
-
solver_type
¶
Methods Documentation
-
adjoint_model
(self, shot, m0, operand_simdata, frequencies, operand_dWaveOpAdj=None, operand_model=None, frequency_weights=None, return_parameters=[], dWaveOp=None, wavefield=None)[source]¶ Solves for the adjoint field in frequency.
For constant density: -m*(omega**2)*q - lap q = resid, where m = 1.0/c**2 For variable density: -m1*(omega**2)*q - div(m2 grad)q = resid, where m1=1.0/kappa, m2=1.0/rho, and C = (kappa/rho)**0.5
Parameters: - shot : pysit.Shot
Gives the receiver model for the right hand side.
- operand : ndarray
Right hand side, usually the residual.
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- return_parameters : list of {‘q’, ‘qhat’, ‘ic’}
- dWaveOp : ndarray
Imaging component from the forward model (in frequency).
Returns: - retval : dict
Dictionary whose keys are return_parameters that contains the specified data.
Notes
- q is the adjoint field.
- qhat is the DFT of oq at the specified frequencies
- ic is the imaging component. Because this function computes many of the things required to compute the imaging condition, there is an option to compute the imaging condition as we go. This should be used to save computational effort. If the imaging condition is to be computed, the optional argument utt must be present.
- Imaging Condition for variable density has terms:
- ic.m1 = omegas**2 * conj(u) * q ic.m2 = conj(grad(u)) dot grad(q), summed over all shots and frequencies.
-
adjoint_model_list
(self, shots_list, m0, operand_simdata, frequencies, operand_dWaveOpAdj=None, operand_model=None, frequency_weights=None, return_parameters=[], dWaveOp=None, wavefield=None, **kwargs)[source]¶ Solves for the adjoint field in frequency.
For constant density: -m*(omega**2)*q - lap q = resid, where m = 1.0/c**2 For variable density: -m1*(omega**2)*q - div(m2 grad)q = resid, where m1=1.0/kappa, m2=1.0/rho, and C = (kappa/rho)**0.5
Parameters: - shot : pysit.Shot
Gives the receiver model for the right hand side.
- operand : ndarray
Right hand side, usually the residual.
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- return_parameters : list of {‘q’, ‘qhat’, ‘ic’}
- dWaveOp : ndarray
Imaging component from the forward model (in frequency).
Returns: - retval : dict
Dictionary whose keys are return_parameters that contains the specified data.
Notes
- q is the adjoint field.
- qhat is the DFT of oq at the specified frequencies
- ic is the imaging component. Because this function computes many of the things required to compute the imaging condition, there is an option to compute the imaging condition as we go. This should be used to save computational effort. If the imaging condition is to be computed, the optional argument utt must be present.
- Imaging Condition for variable density has terms:
- ic.m1 = omegas**2 * conj(u) * q ic.m2 = conj(grad(u)) dot grad(q), summed over all shots and frequencies.
-
forward_model
(self, shot, m0, frequencies, return_parameters=[])[source]¶ Applies the forward model to the model for the given solver.
Parameters: - shot : pysit.Shot
Gives the source signal approximation for the right hand side.
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- return_parameters : list of {‘wavefield’, ‘simdata’, ‘simdata_time’, ‘dWaveOp’}
Returns: - retval : dict
Dictionary whose keys are return_parameters that contains the specified data.
Notes
- u is used as the target field universally. It could be velocity potential, it could be displacement, it could be pressure.
- uhat is used to generically refer to the DFT of u that is needed to compute the imaging condition.
Forward model computes:
For constant density: -m*(omega**2)*u - lap u = f, where m = 1.0/c**2 For variable density: -m1*(omega**2)*u - div(m2 grad)u = f, where m1=1.0/kappa, m2=1.0/rho, and C = (kappa/rho)**0.5
-
forward_model_list
(self, shot_list, m0, frequencies, return_parameters=[], **kwargs)[source]¶ Applies the forward model to the model for the given solver and severals shots
Parameters: - shot_list : list of pysit.Shot
Gives the source signal approximation for the right hand side.
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- return_parameters : list of {‘wavefield’, ‘simdata’, ‘simdata_time’, ‘dWaveOp’}
Returns: - retval : dict
Dictionary whose keys are return_parameters that contains the specified data.
Notes
- u is used as the target field universally. It could be velocity potential, it could be displacement, it could be pressure.
- uhat is used to generically refer to the DFT of u that is needed to compute the imaging condition.
-
linear_forward_model
(self, shot, m0, m1, frequencies, return_parameters=[], dWaveOp0=None)[source]¶ Applies the forward model to the model for the given solver.
Parameters: - shot : pysit.Shot
Gives the source signal approximation for the right hand side.
- m1 : solver.ModelParameters
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- return_parameters : list of {‘dWaveOp0’, ‘wavefield1’, ‘dWaveOp1’, ‘simdata’, ‘simdata_time’}, optional
Values to return.
Returns: - retval : dict
Dictionary whose keys are return_parameters that contains the specified data.
Notes
- u1 is used as the target field universally. It could be velocity potential, it could be displacement, it could be pressure.
- u1tt is used to generically refer to the derivative of u1 that is needed to compute the imaging condition.
- If u0tt is not specified, it may be computed on the fly at potentially high expense.
-
linear_forward_model_kappa
(self, shot, m0, m1, frequencies, return_parameters=[], dWaveOp0=None, wavefield=None)[source]¶ Applies the forward model to the model for the given solver in terms of a pertubation of kappa
Parameters: - shot : pysit.Shot
Gives the source signal approximation for the right hand side.
- m1 : solver.ModelParameters
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- return_parameters : list of {‘dWaveOp0’, ‘wavefield1’, ‘dWaveOp1’, ‘simdata’, ‘simdata_time’}, optional
Values to return.
Returns: - retval : dict
Dictionary whose keys are return_parameters that contains the specified data.
Notes
- u1 is used as the target field universally. It could be velocity potential, it could be displacement, it could be pressure.
- u1tt is used to generically refer to the derivative of u1 that is needed to compute the imaging condition.
- If u0tt is not specified, it may be computed on the fly at potentially high expense.
-
linear_forward_model_rho
(self, shot, m0, m1, frequencies, return_parameters=[], dWaveOp0=None, wavefield=None)[source]¶ Applies the forward model to the model for the given solver in terms of a pertubation of rho
Parameters: - shot : pysit.Shot
Gives the source signal approximation for the right hand side.
- m1 : solver.ModelParameters
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- return_parameters : list of {‘dWaveOp0’, ‘wavefield1’, ‘dWaveOp1’, ‘simdata’, ‘simdata_time’}, optional
Values to return.
Returns: - retval : dict
Dictionary whose keys are return_parameters that contains the specified data.
Notes
- u1 is used as the target field universally. It could be velocity potential, it could be displacement, it could be pressure.
- u1tt is used to generically refer to the derivative of u1 that is needed to compute the imaging condition.
- If u0tt is not specified, it may be computed on the fly at potentially high expense.
-
migrate_shot
(self, shot, m0, operand_simdata, frequencies, operand_dWaveOpAdj=None, operand_model=None, frequency_weights=None, dWaveOp=None, adjointfield=None, dWaveOpAdj=None, wavefield=None)[source]¶ Performs migration on a single shot.
Parameters: - shot : pysit.Shot
Shot for which to compute migration.
- operand_simdata : ndarray
Operand, i.e., b in F*b. This data is in TIME to properly compute the adjoint.
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- utt : list
Imaging condition components from the forward model for each receiver in the shot.
- qs : list
Optional return list allowing us to retrieve the adjoint field as desired.
-
migrate_shot_list
(self, shots_list, m0, operand_simdata, frequencies, operand_dWaveOpAdj=None, operand_model=None, frequency_weights=None, dWaveOp=None, adjointfield=None, dWaveOpAdj=None, wavefield=None, **kwargs)[source]¶ Performs migration a list of shot shot.
Parameters: - shots_list : list of pysit.Shot
Shot for which to compute migration.
- operand_simdata : ndarray
Operand, i.e., b in F*b. This data is in TIME to properly compute the adjoint.
- frequencies : list of 2-tuples
2-tuple, first element is the frequency to use, second element the weight.
- utt : list
Imaging condition components from the forward model for each receiver in the shot.
- qs : list
Optional return list allowing us to retrieve the adjoint field as desired.
-