Required
name| Type: | str |
| Description: | Name of the inverse problem. |
class InverseProblemConfiguration(
salvus.flow.utils.serialization_helpers.SerializationMixin
):
def __init__(
self,
name: str,
prior_model: str,
events: str | typing.Sequence[str],
method: TrustRegion,
mapping: Mapping,
preconditioner: (
ConstantSmoothing
| ModelDependentSmoothing
| SpaceDependentSmoothing
| typing.Callable
| str
| None
) = None,
extra_kwargs_preconditioner: dict | None = None,
misfit_configuration: MisfitConfiguration | str | None = None,
wavefield_compression: WavefieldCompression | None = None,
event_batch_selection: str | typing.Callable | None = None,
job_submission: (
SiteConfig
| TaskChainSiteConfig
| dict[str, SiteConfig | bool | dict[str, TaskChainSiteConfig]]
| MPIExecutionConfiguration
| None
) = None,
): ...| Type: | str |
| Description: | Name of the inverse problem. |
| Type: | str |
| Description: | Prior model. |
| Type: | str | typing.Sequence[str] |
| Description: | List of events to consider. |
| Type: | TrustRegion |
| Description: | Descent method to solve the inverse problem. |
| Type: | Mapping |
| Description: | Mapping between inversion and simulation domain. |
| Type: | ConstantSmoothing | ModelDependentSmoothing | SpaceDependentSmoothing | typing.Callable | str | None |
| Default value: | None |
| Description: | Preconditioner used by the descent method. |
| Type: | dict | None |
| Default value: | None |
| Description: | Additional keyword arguments for custom preconditioners. |
| Type: | MisfitConfiguration | str | None |
| Default value: | None |
| Description: | The misfit configuration. |
| Type: | WavefieldCompression | None |
| Default value: | None |
| Description: | The compression settings for checkpoints and recomputing the forward wavefield during the adjoint run. |
| Type: | str | typing.Callable | None |
| Default value: | None |
| Description: | Optional callback function for selecting a new subset of events in every new iteration. |
| Type: | SiteConfig | TaskChainSiteConfig | dict[str, SiteConfig | bool | dict[str, TaskChainSiteConfig]] | MPIExecutionConfiguration | None |
| Default value: | None |
| Description: | Submission settings for asynchronous jobs. |
typing.Callable | None)-Get the event batch selection callback if available.str | None)-Get the event batch selection callback as string if available.def from_json(
d: dict, json_path: pathlib.Path, model_inventory_path: pathlib.Path
) -> InverseProblemConfiguration: ...| Type: | dict |
| Description: | JSON dictionary of the inverse problem. |
| Type: | pathlib.Path |
| Description: | Path to serialized json file. |
| Type: | pathlib.Path |
| Description: | Path to the model inventory at the project level. |
def add_events(self, events: typing.Sequence[str]) -> None: ...| Type: | typing.Sequence[str] |
| Description: | List of event names. |
def add_iteration(
self, iteration: Iteration[UnstructuredModel], comm: int | None = None
) -> None: ...| Type: | Iteration[UnstructuredModel] |
| Description: | Iteration. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def check_stopping_criteria(
self, iteration_id: salvus._core.types.int_ | None = None
) -> bool: ...| Type: | salvus._core.types.int_ | None |
| Default value: | None |
| Description: | Iteration id. |
def delete_iteration(self, id: int) -> None: ...| Type: | int |
| Description: | ID of the iteration to delete. |
def get_all_branches(self) -> dict[str, list[int]]: ...def get_branch_ids(self, latest: int) -> list[int]: ...| Type: | int |
| Description: | Id of the latest iteration. |
def get_iteration(self, id: int) -> Iteration: ...| Type: | int |
| Description: | ID of the iteration. |
def get_iteration_directory(self, iteration_id: int) -> pathlib.Path: ...| Type: | int |
| Description: | ID of the iteration. |
def get_iteration_ids(self, status: str = "all") -> typing.Sequence[int]: ...| Type: | str |
| Default value: | 'all' |
| Description: | Status of the iteration. |
def get_new_iteration_id(self) -> int: ...def set_constraints(
self, constraints: dict[str, UnstructuredModel]
) -> None: ...| Type: | dict[str, UnstructuredModel] |
| Description: | Optional lower and upper bounds on the model parameters. |
def set_job_submission(
self,
job_submission: (
SiteConfig
| TaskChainSiteConfig
| dict[str, SiteConfig | bool | dict[str, TaskChainSiteConfig]]
),
comm: int | None = None,
) -> None: ...| Type: | SiteConfig | TaskChainSiteConfig | dict[str, SiteConfig | bool | dict[str, TaskChainSiteConfig]] |
| Description: | Either a SiteConfig or a dictionary of SiteConfigs or with keys forward, adjoint and preconditioner. Instead of a SiteConfig it is also possible to pass a dictionary of TaskChainSiteConfigs for forward and adjoint. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def set_stopping_criteria(self, criteria: dict) -> None: ...| Type: | dict |
| Description: | Dictionary of stopping criteria. If any of them is true, no further iterations will be added. Currently supported are max_iterations for the maximum number of iterations per branch and max_iterations_global for the maximum number of iterations in the entire inversion tree. |
def set_wavefield_compression(
self, wavefield_compression: WavefieldCompression, comm: int | None = None
) -> None: ...| Type: | WavefieldCompression |
| Description: | Wavefield compression settings. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def to_json(
self,
external_file_hash: str | None = None,
timer: Timer | None = None,
log_to_logger: bool = False,
comm: int | None = None,
) -> dict: ...| Type: | str | None |
| Default value: | None |
| Description: | 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. |
| Type: | Timer | None |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |
def update_iteration(
self, iteration: Iteration[UnstructuredModel], comm: int | None = None
) -> None: ...| Type: | Iteration[UnstructuredModel] |
| Description: | Iteration to update. |
| Type: | int | None |
| Default value: | None |
| Description: | MPI communicator, if any. |