Mondaic

salvus.project.components.action.validation.validation_action_component

salvus.project.components.action.validation.validation_action_component salvus project components action validation validation_action_component

Validation action component.

Classes

ValidationActionComponent

class ValidationActionComponent(builtins.object):
    def __init__(self, project: Project): ...

Initialize the action component.

Parameters
  • project Project — Project to be registered.
Methods
validate_data_processing()
def validate_data_processing(
    self,
    data_name: str,
    receiver_field: str,
    events: (
        str
        | typing.Sequence[str]
        | typing.Sequence[Event]
        | EventCollection
        | None
    ) = None,
    time_axis: TimeAxis | None = None,
) -> None: ...

Validate the data processing.

Parameters
  • data_name str — Name of the data to validate.
  • receiver_field str — Receiver field to validate (e.g., “displacement”).
  • events str | typing.Sequence[str] | typing.Sequence[Event] | EventCollection | None — List of events to validate. If None, it will validate all events in the project.
  • time_axis TimeAxis | None — Try to retrieve the data on a prescribed time axis. If no time axis is provided, the data is retrieved on its native time axis.
Returns None — A dictionary of validation results.
validate_model_gradients()
def validate_model_gradients(
    self,
    simulation_configuration: str,
    misfit_configuration: str,
    wavefield_compression: WavefieldCompression,
    events: str | list[str] | Event | list[Event] | EventCollection,
    parameters: str | list[str],
    h: list[salvus._core.types.float_],
    site_name: str,
    ranks_per_job: int,
    wall_time_in_seconds_per_job: salvus._core.types.int_ | None = None,
    sleep_interval: salvus._core.types.float_ = 1.0,
) -> dict: ...

Measure the error of the model gradients computed in Salvus.

Parameters
  • simulation_configuration str — Simulation configuration to test.
  • misfit_configuration str — Misfit configuration to test.
  • wavefield_compression WavefieldCompression — Wavefield compression settings.
  • events str | list[str] | Event | list[Event] | EventCollection — Events to test.
  • parameters str | list[str] — Model parameters to test.
  • h list[salvus._core.types.float_] — An array of relative model perturbations.
  • site_name str — Site on which to run the tests.
  • ranks_per_job int — Number of ranks on which to run the tests.
  • wall_time_in_seconds_per_job salvus._core.types.int_ | None — Wall time per test job. Defaults to None.
  • sleep_interval salvus._core.types.float_ — Sleep interval between querying job status. Defaults to 1.0.
Returns dict — A dictionary of misfits per event.