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
ValidationActionComponentclass ValidationActionComponent(builtins.object):
def __init__(self, project: Project): ...Initialize the action component.
Parameters
projectProject — Project to be registered.
Methods
validate_data_processing()
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_namestr — Name of the data to validate.receiver_fieldstr — Receiver field to validate (e.g., “displacement”).eventsstr | typing.Sequence[str] | typing.Sequence[Event] | EventCollection | None — List of events to validate. If None, it will validate all events in the project.time_axisTimeAxis | 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()
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_configurationstr — Simulation configuration to test.misfit_configurationstr — Misfit configuration to test.wavefield_compressionWavefieldCompression — Wavefield compression settings.eventsstr | list[str] | Event | list[Event] | EventCollection — Events to test.parametersstr | list[str] — Model parameters to test.hlist[salvus._core.types.float_] — An array of relative model perturbations.site_namestr — Site on which to run the tests.ranks_per_jobint — Number of ranks on which to run the tests.wall_time_in_seconds_per_jobsalvus._core.types.int_ | None — Wall time per test job. Defaults to None.sleep_intervalsalvus._core.types.float_ — Sleep interval between querying job status. Defaults to 1.0.
Returns dict — A dictionary of misfits per event.