VelocityBase
-
class
aquila_borg.forward.velocity.
VelocityBase
This is the base class for models that compute velocity field from a forward model output.
This class is abstract and not constructible. The construction of a velocity field requires that the base formward model has been executed using aquila_borg.forward.models.BORGForwardModel.forwardModel_v2.
-
computeAdjointModel
(self: aquila_borg._borg.forward.velocity.VelocityBase, ag: numpy.ndarray[numpy.float64]) → None Push the adjoint gradient of the velocity field in the model.
Depending on the specific model used, the produced adjoint gradient is pushed to the forward model that produced the simulation (e.g. aquila_borg.forward.model.BorgLpt).
- Parameters
ag (numpy.array) – The adjoint gradient with respect to the output of the velocity model. The adjoint gradient must have a shape 3xN0xN1xN2, where N0 may be MPI-sliced. If the adjoint is not densely packed and double precision, it will be implicitly force cast to the adequate requirement (i.e. it may need more memory).
-
getOutputBox
(self: aquila_borg._borg.forward.velocity.VelocityBase) → aquila_borg._borg.forward.BoxModel Return the aquila_borg.forward.BoxModel corresponding to the output of this velocity field model.
-
getVelocityField
(self: aquila_borg._borg.forward.velocity.VelocityBase) → numpy.ndarray[numpy.float64] Compute and returns the velocity field associated to the base forward model.
- Returns
a 3xN0xN1xN2 velocity field on grid.
- Return type
numpy.array
-
Methods
|
Initialize self. |
|
Push the adjoint gradient of the velocity field in the model. |
|
Return the aquila_borg.forward.BoxModel corresponding to the output of this velocity field model. |
|
Compute and returns the velocity field associated to the base forward model. |