Version:
This tutorial is presented as Python code running inside a Jupyter Notebook, the recommended way to use Salvus. To run it yourself you can copy/type each individual cell or directly download the full notebook, including all required files.
Copy
%matplotlib inline
%config Completer.use_jedi = False

import os

SALVUS_FLOW_SITE_NAME = os.environ.get("SITE_NAME", "local")

Inverting for homogeneous material

In this mini-tutorial, we demonstrate how the mapping function can be used to invert for homogeneous material parameters. Here, the adjoint operation of the mapping class maps the space-dependent physical gradient into the subspace of homogeneous model parameters.

Take-home message

Selecting scaling="homogeneous" in the mapping function of an InverseProblemConfiguration enables inversion for homogeneous model parameters with full-waveform inversion.
sn.Mapping(
    scaling="homogeneous",
    inversion_parameters=[...],
    ...
)
import matplotlib.pyplot as plt
import numpy as np
import pathlib
import time
import xarray as xr

import salvus.namespace as sn
We consider a simplistic setup with a 2D elastic box domain with a single source-receiver pair.
Check out the full FWI tutorial for more details on the individual steps.
p = sn.Project.from_domain(
    path="project",
    domain=sn.domain.dim2.BoxDomain(
        x0=0.0,
        x1=1.0,
        y0=0.0,
        y1=1.5,
    ),
    load_if_exists=True,
)
src = sn.simple_config.source.cartesian.VectorPoint2D(
    x=0.33, y=0.0, fx=0.0, fy=1.0e9
)

rec = sn.simple_config.receiver.cartesian.Point2D(
    x=0.67,
    y=1.5,
    fields=["displacement"],
    network_code="REC",
    station_code="000",
)

p += sn.Event(event_name="event", sources=src, receivers=rec)
ec = sn.EventConfiguration(
    waveform_simulation_configuration=sn.WaveformSimulationConfiguration(
        end_time_in_seconds=0.0006
    ),
    wavelet=sn.simple_config.stf.Ricker(center_frequency=10000.0),
)
p.viz.nb.domain()
We consider two different homogeneous isotropic media. The "true" model we seek to reconstruct varies from the initial model in vp, vs and rho. Note that the deviations in the parameters have opposite signs and different magnitudes.
true_model = sn.model.background.homogeneous.IsotropicElastic(
    vp=5800.0, vs=3200.0, rho=2600.0
)
initial_model = sn.model.background.homogeneous.IsotropicElastic(
    vp=5600.0, vs=3300.0, rho=2400.0
)
for name, model in zip(["true", "init"], [true_model, initial_model]):
    p.add_to_project(
        sn.SimulationConfiguration(
            name=name,
            elements_per_wavelength=2,
            tensor_order=1,
            max_frequency_in_hertz=20000.0,
            model_configuration=sn.ModelConfiguration(background_model=model),
            event_configuration=ec,
        ),
        overwrite=True,
    )

    p.simulations.launch(
        simulation_configuration=name,
        events=p.events.get_all(),
        site_name=SALVUS_FLOW_SITE_NAME,
        ranks_per_job=1,
    )
[2023-05-29 20:00:08,030] INFO: Creating mesh. Hang on.
[2023-05-29 20:00:08,615] INFO: Submitting job ...
Uploading 1 files...

🚀  Submitted job_2305292000747201_80f0f15b07@local
[2023-05-29 20:00:08,853] INFO: Creating mesh. Hang on.
[2023-05-29 20:00:08,886] INFO: Submitting job ...
Uploading 1 files...

🚀  Submitted job_2305292000893855_21681f1097@local
p.simulations.query(block=True)
True
This is of course not a realistic setup, but the waveforms differ in both components.
p.viz.nb.waveforms(data=["true", "init"], receiver_field="displacement")
Next, we setup the inverse problem. We are using scaling="homogeneous" in the mapping function, which enforces a homogeneous medium in every iteration. Note that a smoothing preconditioner is not necessary here, because the mapped gradient is already homogeneous.
p += sn.MisfitConfiguration(
    name="L2",
    observed_data="true",
    misfit_function="L2",
    receiver_field="displacement",
)
p += sn.InverseProblemConfiguration(
    name="inversion",
    prior_model="init",
    events=p.events.list(),
    mapping=sn.Mapping(
        scaling="homogeneous",
        inversion_parameters=["VP", "VS", "RHO"],
    ),
    method=sn.TrustRegion(initial_trust_region_linf=100.0),
    misfit_configuration="L2",
    job_submission=sn.SiteConfig(
        site_name=SALVUS_FLOW_SITE_NAME, ranks_per_job=1
    ),
)
for i in range(10):
    p.inversions.iterate(
        inverse_problem_configuration="inversion",
        timeout_in_seconds=360,
        ping_interval_in_seconds=1,
    )
[2023-05-29 20:00:10,388] INFO: Adding new iteration #0.
[2023-05-29 20:00:10,400] INFO: Resuming iteration #0.

[2023-05-29 20:00:10,400] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:10,401] INFO: Processing task `misfit_and_gradient`
[2023-05-29 20:00:10,427] INFO: The following events have been simulated before, but checkpoints are not available for this combination of `site_name` and `ranks_per_job` and wavefield compression settings. They will be run again: ['event']
[2023-05-29 20:00:10,443] INFO: Submitting job ...
[2023-05-29 20:00:10,527] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:10,529] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2023-05-29 20:00:11,532] INFO: Processing task `misfit_and_gradient`
[2023-05-29 20:00:11,949] INFO: Submitting job ...
[2023-05-29 20:00:12,025] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:12,026] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2023-05-29 20:00:13,028] INFO: Processing task `misfit_and_gradient`
[2023-05-29 20:00:13,129] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:13,304] INFO: 
Iteration 0: Number of events: 1	 chi = 3.7156536966723097e-10	 ||g|| = 3.3910356819472767e-12
pred = ---	ared = ---	norm_update = ---	tr_radius = ---
[2023-05-29 20:00:13,310] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:13,310] INFO: Processing task `misfit`
[2023-05-29 20:00:13,351] INFO: Submitting job ...
[2023-05-29 20:00:13,435] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:13,436] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2023-05-29 20:00:14,457] INFO: Processing task `misfit`
[2023-05-29 20:00:14,591] INFO: 
old misfit control group: 3.7156536966723097e-10
new misfit control group: 1.073889989952079e-10
predicted reduction control group: -2.1653940651003643e-10
actual reduction control group: -2.6417637067202306e-10
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:14,592] INFO: 
Model update accepted.
[2023-05-29 20:00:14,593] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:14,593] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:14,614] INFO: Succesfully completed iteration #0.
[2023-05-29 20:00:14,616] INFO: Adding new iteration #1.
[2023-05-29 20:00:14,622] INFO: Resuming iteration #1.

[2023-05-29 20:00:14,623] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:14,623] INFO: Processing task `gradient`
[2023-05-29 20:00:14,710] INFO: Submitting job ...
[2023-05-29 20:00:14,787] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:14,788] INFO: Some tasks of iteration #1 are still running. Please check again later.
[2023-05-29 20:00:15,791] INFO: Processing task `gradient`
[2023-05-29 20:00:15,853] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:16,034] INFO: 
Iteration 1: Number of events: 1	 chi = 1.073889989952079e-10	 ||g|| = 1.0372296745391399e-12
pred = -2.1653940651003643e-10	ared = -2.6417637067202306e-10	norm_update = 127.71284458185958	tr_radius = 127.71284458185946
[2023-05-29 20:00:16,048] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:16,049] INFO: Processing task `misfit`
[2023-05-29 20:00:16,088] INFO: Submitting job ...
[2023-05-29 20:00:16,171] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:16,172] INFO: Some tasks of iteration #1 are still running. Please check again later.
[2023-05-29 20:00:17,193] INFO: Processing task `misfit`
[2023-05-29 20:00:17,323] INFO: 
old misfit control group: 1.073889989952079e-10
new misfit control group: 7.296709075757565e-11
predicted reduction control group: -1.886436794468989e-11
actual reduction control group: -3.442190823763225e-11
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:17,324] INFO: 
Model update accepted.
[2023-05-29 20:00:17,325] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:17,326] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:17,349] INFO: Succesfully completed iteration #1.
[2023-05-29 20:00:17,354] INFO: Adding new iteration #2.
[2023-05-29 20:00:17,366] INFO: Resuming iteration #2.

[2023-05-29 20:00:17,367] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:17,367] INFO: Processing task `gradient`
[2023-05-29 20:00:17,456] INFO: Submitting job ...
[2023-05-29 20:00:17,539] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:17,540] INFO: Some tasks of iteration #2 are still running. Please check again later.
[2023-05-29 20:00:18,544] INFO: Processing task `gradient`
[2023-05-29 20:00:18,606] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:18,779] INFO: 
Iteration 2: Number of events: 1	 chi = 7.296709075757565e-11	 ||g|| = 8.841255606549503e-13
pred = -1.886436794468989e-11	ared = -3.442190823763225e-11	norm_update = 38.05515885834568	tr_radius = 255.4256891637189
[2023-05-29 20:00:18,800] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:18,800] INFO: Processing task `misfit`
[2023-05-29 20:00:18,838] INFO: Submitting job ...
[2023-05-29 20:00:18,922] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:18,923] INFO: Some tasks of iteration #2 are still running. Please check again later.
[2023-05-29 20:00:19,944] INFO: Processing task `misfit`
[2023-05-29 20:00:20,082] INFO: 
old misfit control group: 7.296709075757565e-11
new misfit control group: 7.29921706188182e-12
predicted reduction control group: -5.3947832908490025e-11
actual reduction control group: -6.566787369569383e-11
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:20,083] INFO: 
Model update accepted.
[2023-05-29 20:00:20,083] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:20,083] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:20,249] INFO: Succesfully completed iteration #2.
[2023-05-29 20:00:20,253] INFO: Adding new iteration #3.
[2023-05-29 20:00:20,265] INFO: Resuming iteration #3.

[2023-05-29 20:00:20,266] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:20,266] INFO: Processing task `gradient`
[2023-05-29 20:00:20,358] INFO: Submitting job ...
[2023-05-29 20:00:20,432] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:20,433] INFO: Some tasks of iteration #3 are still running. Please check again later.
[2023-05-29 20:00:21,438] INFO: Processing task `gradient`
[2023-05-29 20:00:21,496] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:21,667] INFO: 
Iteration 3: Number of events: 1	 chi = 7.29921706188182e-12	 ||g|| = 2.108070998417816e-13
pred = -5.3947832908490025e-11	ared = -6.566787369569383e-11	norm_update = 127.71284458185985	tr_radius = 127.71284458185946
[2023-05-29 20:00:21,696] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:21,696] INFO: Processing task `misfit`
[2023-05-29 20:00:21,730] INFO: Submitting job ...
[2023-05-29 20:00:21,815] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:21,816] INFO: Some tasks of iteration #3 are still running. Please check again later.
[2023-05-29 20:00:22,839] INFO: Processing task `misfit`
[2023-05-29 20:00:22,978] INFO: 
old misfit control group: 7.29921706188182e-12
new misfit control group: 3.853990185690102e-12
predicted reduction control group: -3.6255277549080314e-12
actual reduction control group: -3.4452268761917177e-12
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:22,979] INFO: 
Model update accepted.
[2023-05-29 20:00:22,980] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:22,980] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:23,005] INFO: Succesfully completed iteration #3.
[2023-05-29 20:00:23,010] INFO: Adding new iteration #4.
[2023-05-29 20:00:23,022] INFO: Resuming iteration #4.

[2023-05-29 20:00:23,023] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:23,024] INFO: Processing task `gradient`
[2023-05-29 20:00:23,119] INFO: Submitting job ...
[2023-05-29 20:00:23,197] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:23,198] INFO: Some tasks of iteration #4 are still running. Please check again later.
[2023-05-29 20:00:24,203] INFO: Processing task `gradient`
[2023-05-29 20:00:24,278] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:24,445] INFO: 
Iteration 4: Number of events: 1	 chi = 3.853990185690102e-12	 ||g|| = 5.491251396381121e-14
pred = -3.6255277549080314e-12	ared = -3.4452268761917177e-12	norm_update = 37.63459769503881	tr_radius = 255.4256891637189
[2023-05-29 20:00:24,482] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:24,483] INFO: Processing task `misfit`
[2023-05-29 20:00:24,518] INFO: Submitting job ...
[2023-05-29 20:00:24,599] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:24,600] INFO: Some tasks of iteration #4 are still running. Please check again later.
[2023-05-29 20:00:25,624] INFO: Processing task `misfit`
[2023-05-29 20:00:25,757] INFO: 
old misfit control group: 3.853990185690102e-12
new misfit control group: 3.660798440136839e-12
predicted reduction control group: -1.1394903834105516e-13
actual reduction control group: -1.9319174555326333e-13
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:25,758] INFO: 
Model update accepted.
[2023-05-29 20:00:25,758] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:25,759] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:25,783] INFO: Succesfully completed iteration #4.
[2023-05-29 20:00:25,788] INFO: Adding new iteration #5.
[2023-05-29 20:00:25,803] INFO: Resuming iteration #5.

[2023-05-29 20:00:25,804] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:25,805] INFO: Processing task `gradient`
[2023-05-29 20:00:25,892] INFO: Submitting job ...
[2023-05-29 20:00:25,973] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:25,974] INFO: Some tasks of iteration #5 are still running. Please check again later.
[2023-05-29 20:00:26,979] INFO: Processing task `gradient`
[2023-05-29 20:00:27,045] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:27,208] INFO: 
Iteration 5: Number of events: 1	 chi = 3.660798440136839e-12	 ||g|| = 3.682525298193585e-14
pred = -1.1394903834105516e-13	ared = -1.9319174555326333e-13	norm_update = 4.998974724157342	tr_radius = 127.71284458185946
[2023-05-29 20:00:27,256] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:27,257] INFO: Processing task `misfit`
[2023-05-29 20:00:27,295] INFO: Submitting job ...
[2023-05-29 20:00:27,385] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:27,386] INFO: Some tasks of iteration #5 are still running. Please check again later.
[2023-05-29 20:00:28,409] INFO: Processing task `misfit`
[2023-05-29 20:00:28,538] INFO: 
old misfit control group: 3.660798440136839e-12
new misfit control group: 2.980987500487273e-12
predicted reduction control group: -4.432369142288363e-13
actual reduction control group: -6.798109396495656e-13
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:28,539] INFO: 
Model update accepted.
[2023-05-29 20:00:28,539] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:28,540] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:28,564] INFO: Succesfully completed iteration #5.
[2023-05-29 20:00:28,569] INFO: Adding new iteration #6.
[2023-05-29 20:00:28,587] INFO: Resuming iteration #6.

[2023-05-29 20:00:28,588] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:28,588] INFO: Processing task `gradient`
[2023-05-29 20:00:28,688] INFO: Submitting job ...
[2023-05-29 20:00:28,769] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:28,770] INFO: Some tasks of iteration #6 are still running. Please check again later.
[2023-05-29 20:00:29,776] INFO: Processing task `gradient`
[2023-05-29 20:00:29,834] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:30,005] INFO: 
Iteration 6: Number of events: 1	 chi = 2.980987500487273e-12	 ||g|| = 1.1332571298971109e-13
pred = -4.432369142288363e-13	ared = -6.798109396495656e-13	norm_update = 25.945614165832442	tr_radius = 63.85642229092973
[2023-05-29 20:00:30,057] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:30,058] INFO: Processing task `misfit`
[2023-05-29 20:00:30,100] INFO: Submitting job ...
[2023-05-29 20:00:30,182] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:30,183] INFO: Some tasks of iteration #6 are still running. Please check again later.
[2023-05-29 20:00:31,206] INFO: Processing task `misfit`
[2023-05-29 20:00:31,333] INFO: 
old misfit control group: 2.980987500487273e-12
new misfit control group: 1.9556121150259184e-12
predicted reduction control group: -6.673016420081787e-13
actual reduction control group: -1.0253753854613548e-12
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:31,334] INFO: 
Model update accepted.
[2023-05-29 20:00:31,334] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:31,335] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:31,359] INFO: Succesfully completed iteration #6.
[2023-05-29 20:00:31,364] INFO: Adding new iteration #7.
[2023-05-29 20:00:31,382] INFO: Resuming iteration #7.

[2023-05-29 20:00:31,383] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:31,383] INFO: Processing task `gradient`
[2023-05-29 20:00:31,475] INFO: Submitting job ...
[2023-05-29 20:00:31,557] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:31,558] INFO: Some tasks of iteration #7 are still running. Please check again later.
[2023-05-29 20:00:32,564] INFO: Processing task `gradient`
[2023-05-29 20:00:32,625] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:32,857] INFO: 
Iteration 7: Number of events: 1	 chi = 1.9556121150259184e-12	 ||g|| = 1.808294297046996e-13
pred = -6.673016420081787e-13	ared = -1.0253753854613548e-12	norm_update = 51.891228331664706	tr_radius = 51.891228331664884
[2023-05-29 20:00:32,930] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:32,931] INFO: Processing task `misfit`
[2023-05-29 20:00:32,969] INFO: Submitting job ...
[2023-05-29 20:00:33,050] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:33,052] INFO: Some tasks of iteration #7 are still running. Please check again later.
[2023-05-29 20:00:34,077] INFO: Processing task `misfit`
[2023-05-29 20:00:34,227] INFO: 
old misfit control group: 1.9556121150259184e-12
new misfit control group: 7.196715258273985e-13
predicted reduction control group: -8.886064834127477e-13
actual reduction control group: -1.2359405891985199e-12
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:34,227] INFO: 
Model update accepted.
[2023-05-29 20:00:34,228] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:34,228] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:34,256] INFO: Succesfully completed iteration #7.
[2023-05-29 20:00:34,264] INFO: Adding new iteration #8.
[2023-05-29 20:00:34,291] INFO: Resuming iteration #8.

[2023-05-29 20:00:34,292] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:34,293] INFO: Processing task `gradient`
[2023-05-29 20:00:34,384] INFO: Submitting job ...
[2023-05-29 20:00:34,465] INFO: Launched adjoint simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:34,466] INFO: Some tasks of iteration #8 are still running. Please check again later.
[2023-05-29 20:00:35,473] INFO: Processing task `gradient`
[2023-05-29 20:00:35,533] INFO: 1 events have already been submitted. They will not be submitted again.
[2023-05-29 20:00:35,701] INFO: 
Iteration 8: Number of events: 1	 chi = 7.196715258273985e-13	 ||g|| = 1.6684176159467122e-13
pred = -8.886064834127477e-13	ared = -1.2359405891985199e-12	norm_update = 83.03736905814233	tr_radius = 103.78245666332977
[2023-05-29 20:00:35,770] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:35,771] INFO: Processing task `misfit`
[2023-05-29 20:00:35,807] INFO: Submitting job ...
[2023-05-29 20:00:35,887] INFO: Launched simulations for 1 events. Please check again to see if they are finished.
[2023-05-29 20:00:35,887] INFO: Some tasks of iteration #8 are still running. Please check again later.
[2023-05-29 20:00:36,910] INFO: Processing task `misfit`
[2023-05-29 20:00:37,044] INFO: 
old misfit control group: 7.196715258273985e-13
new misfit control group: 3.4285138457552776e-14
predicted reduction control group: -5.16200387040007e-13
actual reduction control group: -6.853863873698457e-13
1 out of 1 event(s) improved the misfit.
[2023-05-29 20:00:37,045] INFO: 
Model update accepted.
[2023-05-29 20:00:37,045] INFO: 1 new tasks have been issued.
[2023-05-29 20:00:37,046] INFO: Processing task `finalize_iteration`
[2023-05-29 20:00:37,077] INFO: Succesfully completed iteration #8.
[2023-05-29 20:00:37,085] INFO: Adding new iteration #9.
[2023-05-29 20:00:37,118] INFO: Resuming iteration #9.

[2023-05-29 20:00:37,119] INFO: The total number of iterations in this inversion tree has been reached and no new iteration will be added. If you want to continue with this inversion, you need to adjust `max_iterations_global` using `set_stopping_criteria`.
Finally, we load the final model and check that it indeed converged to the true model. The reconstruction matches the true model with less than 0.1% error for compressional and shear wave speed and less than 0.2% for density.
p.viz.nb.inversion(inverse_problem_configuration="inversion")