Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.collections.wavefield_compression

Wavefield compression settings.

Classes

WavefieldCompression

class WavefieldCompression(
    salvus.flow.utils.serialization_helpers.SerializationMixin
):
    def __init__(
        self,
        forward_wavefield_sampling_interval: Union[
            int, numpy.int32, numpy.int64
        ],
    ):
        ...

Configure wavefield compression settings.

Parameters
  • forward_wavefield_sampling_interval Union[int, numpy.int32, numpy.int64] — Determines the sampling interval of the forward wavefield during the gradient computation. A value of 1 will use every temporal sample and will result in consistent discrete gradients, but also the largest amount of checkpoints and thus the largest amount of memory and disc space. The optimal value is application dependent.
Methods
from_json()
def from_json(d: Dict) -> Any:
    ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
to_json()
def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
    ...

Serialize the object to dictionary that can be written to JSON.

Parameters
  • external_file_hash Optional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
Returns Dict