Version:

Full-Waveform Inversion

Part 5 - Extensions

Copy
%matplotlib inline
# This notebook will use this variable to determine which
# remote site to run on.
import os
import numpy as np
import salvus.namespace as sn

SALVUS_FLOW_SITE_NAME = os.environ.get("SITE_NAME", "local")
p = sn.Project(path="project")

Only update within a region of interest

In a typical USCT setup, there is always enough space between the ultrasound transducers and the phantom. What if we include that information as prior knowledge into our problem formulation?
An easy way of doing this, is to define a region of interest and restrict the reconstruction to this area.
To keep it simple, we just define a sphere with a radius of 6.5 cm as the target region.
mesh = p.simulations.get_mesh(simulation_configuration="initial_model")
# define the region of interest
roi = np.zeros_like(mesh.connectivity)
mask = np.linalg.norm(mesh.points[mesh.connectivity], axis=2) < 0.065
roi[mask] = 1.0
mesh.attach_field("region_of_interest", roi)
Let's see if this helps with the iterations. To be able to compare the results, we just create a new inverse problem within the same project, initialize the region of interest, and start iterating.
p += sn.InverseProblemConfiguration(
    name="my_second_inversion",
    prior_model="initial_model",
    events=p.events.list(),
    mapping=sn.Mapping(
        scaling="absolute",
        inversion_parameters=["VP", "RHO"],
        region_of_interest=mesh,
    ),
    preconditioner=sn.ConstantSmoothing({"VP": 0.01, "RHO": 0.01}),
    method=sn.TrustRegion(initial_trust_region_linf=10.0),
    misfit_configuration="L2",
    wavefield_compression=sn.WavefieldCompression(
        forward_wavefield_sampling_interval=10
    ),
    job_submission=sn.SiteConfig(
        site_name=SALVUS_FLOW_SITE_NAME, ranks_per_job=4
    ),
)
p.inversions.iterate(
    inverse_problem_configuration="my_second_inversion",
    timeout_in_seconds=360,
    ping_interval_in_seconds=10,
    delete_disposable_files="all",
)
[2024-11-20 13:25:32,006] INFO: Adding new iteration #0.
[2024-11-20 13:25:32,028] INFO: Resuming iteration #0.

[2024-11-20 13:25:32,028] INFO: 1 new tasks have been issued.
[2024-11-20 13:25:32,029] INFO: Processing task `misfit_and_gradient`
[2024-11-20 13:25:32,640] INFO: 
Iteration 0: Number of events: 5	 chi = 0.018681064754203797	 ||g|| = 0.016366358801050206
pred = ---	ared = ---	norm_update = ---	tr_radius = ---
[2024-11-20 13:25:32,643] INFO: 1 new tasks have been issued.
[2024-11-20 13:25:32,645] INFO: Processing task `preconditioner`

[2024-11-20 13:25:33,042] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:25:43,090] INFO: Processing task `preconditioner`
[2024-11-20 13:25:43,334] INFO: 1 new tasks have been issued.
[2024-11-20 13:25:43,335] INFO: Processing task `misfit`
[2024-11-20 13:25:43,416] INFO: Submitting job array with 5 jobs ...

[2024-11-20 13:25:43,702] INFO: Launched simulations for 5 events. Please check again to see if they are finished.
[2024-11-20 13:25:43,705] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:25:53,743] INFO: Processing task `misfit`
[2024-11-20 13:25:57,064] INFO: 
old misfit control group: 0.018681064754203797
new misfit control group: 0.007802509365775308
predicted reduction control group: -0.005675405778715309
actual reduction control group: -0.010878555388428489
5 out of 5 event(s) improved the misfit.
[2024-11-20 13:25:57,067] INFO: 
Model update accepted.
[2024-11-20 13:25:57,073] INFO: 1 new tasks have been issued.
[2024-11-20 13:25:57,074] INFO: Processing task `finalize_iteration`
[2024-11-20 13:25:57,211] INFO: ... searching for obsolete files in project/INVERSIONS/my_second_inversion/00000
[2024-11-20 13:25:57,273] INFO: Freed up 1.2 MB of space.
[2024-11-20 13:25:57,275] INFO: Succesfully completed iteration #0.
[2024-11-20 13:25:57,277] INFO: Adding new iteration #1.
Let's see if the region of interest was considered when the model was updated.
p.viz.nb.inversion(inverse_problem_configuration="my_second_inversion")
Indeed, outside of the pre-defined sphere, the model is still constant and has the same values as the initial model.
Let's do a few more iterations and see what the reconstruction will be.
for i in range(2):
    p.inversions.iterate(
        inverse_problem_configuration="my_second_inversion",
        timeout_in_seconds=360,
        ping_interval_in_seconds=10,
        delete_disposable_files="all",
    )
p.viz.nb.inversion(inverse_problem_configuration="my_second_inversion")
[2024-11-20 13:25:59,268] INFO: Resuming iteration #1.

[2024-11-20 13:25:59,268] INFO: 1 new tasks have been issued.
[2024-11-20 13:25:59,269] INFO: Processing task `gradient`
[2024-11-20 13:25:59,645] INFO: Submitting job array with 5 jobs ...
Uploading 1 files...
Uploading 1 files...
Uploading 1 files...
Uploading 1 files...
Uploading 1 files...

[2024-11-20 13:25:59,799] INFO: Launched adjoint simulations for 5 events. Please check again to see if they are finished.
[2024-11-20 13:25:59,807] INFO: Some tasks of iteration #1 are still running. Please check again later.
[2024-11-20 13:26:09,821] INFO: Processing task `gradient`
[2024-11-20 13:26:10,389] INFO: 5 events have already been submitted. They will not be submitted again.
[2024-11-20 13:26:11,121] INFO: 
Iteration 1: Number of events: 5	 chi = 0.0078025093657753085	 ||g|| = 0.008438424180558228
pred = -0.005675405778715309	ared = -0.010878555388428489	norm_update = 0.7166324367619695	tr_radius = 0.7166322852767166
[2024-11-20 13:26:11,139] INFO: 1 new tasks have been issued.
[2024-11-20 13:26:11,140] INFO: Processing task `preconditioner`

[2024-11-20 13:26:11,318] INFO: Some tasks of iteration #1 are still running. Please check again later.
[2024-11-20 13:26:21,358] INFO: Processing task `preconditioner`
[2024-11-20 13:26:21,558] INFO: 1 new tasks have been issued.
[2024-11-20 13:26:21,558] INFO: Processing task `misfit`
[2024-11-20 13:26:21,625] INFO: Submitting job array with 5 jobs ...

[2024-11-20 13:26:21,805] INFO: Launched simulations for 5 events. Please check again to see if they are finished.
[2024-11-20 13:26:21,807] INFO: Some tasks of iteration #1 are still running. Please check again later.
[2024-11-20 13:26:31,913] INFO: Processing task `misfit`
[2024-11-20 13:26:34,550] INFO: 
old misfit control group: 0.007802509365775308
new misfit control group: 0.0038977169133135496
predicted reduction control group: -0.0029460718526640095
actual reduction control group: -0.003904792452461758
5 out of 5 event(s) improved the misfit.
[2024-11-20 13:26:34,553] INFO: 
Model update accepted.
[2024-11-20 13:26:34,554] INFO: 1 new tasks have been issued.
[2024-11-20 13:26:34,555] INFO: Processing task `finalize_iteration`
[2024-11-20 13:26:34,654] INFO: ... searching for obsolete files in project/INVERSIONS/my_second_inversion/00001
[2024-11-20 13:26:34,872] INFO: Freed up 4.8 MB of space.
[2024-11-20 13:26:34,875] INFO: Succesfully completed iteration #1.
[2024-11-20 13:26:34,878] INFO: Adding new iteration #2.
[2024-11-20 13:26:34,891] INFO: Resuming iteration #2.

[2024-11-20 13:26:34,892] INFO: 1 new tasks have been issued.
[2024-11-20 13:26:34,893] INFO: Processing task `gradient`
[2024-11-20 13:26:35,247] INFO: Submitting job array with 5 jobs ...
Uploading 1 files...
Uploading 1 files...
Uploading 1 files...
Uploading 1 files...
Uploading 1 files...

[2024-11-20 13:26:35,372] INFO: Launched adjoint simulations for 5 events. Please check again to see if they are finished.
[2024-11-20 13:26:35,374] INFO: Some tasks of iteration #2 are still running. Please check again later.
[2024-11-20 13:26:45,377] INFO: Processing task `gradient`
[2024-11-20 13:26:45,593] INFO: 5 events have already been submitted. They will not be submitted again.
[2024-11-20 13:26:46,252] INFO: 
Iteration 2: Number of events: 5	 chi = 0.0038977169133135496	 ||g|| = 0.0038998099223934266
pred = -0.0029460718526640095	ared = -0.003904792452461758	norm_update = 0.7368817080094618	tr_radius = 1.4332645705534333
[2024-11-20 13:26:46,281] INFO: 1 new tasks have been issued.
[2024-11-20 13:26:46,282] INFO: Processing task `preconditioner`

[2024-11-20 13:26:46,449] INFO: Some tasks of iteration #2 are still running. Please check again later.
[2024-11-20 13:26:56,532] INFO: Processing task `preconditioner`
[2024-11-20 13:26:56,750] INFO: 1 new tasks have been issued.
[2024-11-20 13:26:56,751] INFO: Processing task `misfit`
[2024-11-20 13:26:56,829] INFO: Submitting job array with 5 jobs ...

[2024-11-20 13:26:57,032] INFO: Launched simulations for 5 events. Please check again to see if they are finished.
[2024-11-20 13:26:57,038] INFO: Some tasks of iteration #2 are still running. Please check again later.
[2024-11-20 13:27:07,170] INFO: Processing task `misfit`
[2024-11-20 13:27:09,930] INFO: 
old misfit control group: 0.0038977169133135496
new misfit control group: 0.003293527922292616
predicted reduction control group: -0.00027362868818550537
actual reduction control group: -0.0006041889910209336
5 out of 5 event(s) improved the misfit.
[2024-11-20 13:27:09,934] INFO: 
Model update accepted.
[2024-11-20 13:27:09,937] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:09,937] INFO: Processing task `finalize_iteration`
[2024-11-20 13:27:10,101] INFO: ... searching for obsolete files in project/INVERSIONS/my_second_inversion/00002
[2024-11-20 13:27:10,319] INFO: Freed up 6.0 MB of space.
[2024-11-20 13:27:10,320] INFO: Succesfully completed iteration #2.
[2024-11-20 13:27:10,323] INFO: Adding new iteration #3.
This looks better, so the prior knowledge was indeed helpful.
Alternatively, we could specify point-wise lower and upper bounds on the model parameters In the example below, we allow deviations of +/- 20% in both VP and RHO, except for the previously selected region of interest, where we restrict VP updates to +/- 1 m/s.
Note that the mapping function does not contain a region of interest in this case.
p += sn.InverseProblemConfiguration(
    name="my_third_inversion",
    prior_model="initial_model",
    events=p.events.list(),
    mapping=sn.Mapping(
        scaling="absolute",
        inversion_parameters=["VP", "RHO"],
    ),
    preconditioner=sn.ConstantSmoothing({"VP": 0.01, "RHO": 0.01}),
    method=sn.TrustRegion(initial_trust_region_linf=10.0),
    misfit_configuration="L2",
    wavefield_compression=sn.WavefieldCompression(
        forward_wavefield_sampling_interval=10
    ),
    job_submission=sn.SiteConfig(
        site_name=SALVUS_FLOW_SITE_NAME, ranks_per_job=4
    ),
)
mesh = p.simulations.get_mesh("initial_model")
lb = mesh.copy()
ones = np.ones_like(lb.elemental_fields["VP"])
lb.elemental_fields["VP"] *= 0.8
lb.elemental_fields["RHO"] *= 0.8
lb.elemental_fields["VP"][roi < 0.5] = 1501.0

ub = mesh.copy()
ub.elemental_fields["VP"] *= 1.2
ub.elemental_fields["RHO"] *= 1.2
ub.elemental_fields["VP"][roi < 0.5] = 1502.0

p.inversions.set_constraints(
    inverse_problem_configuration="my_third_inversion",
    constraints={
        "lower_bounds": lb,
        "upper_bounds": ub,
    },
)
p.inversions.iterate(
    "my_third_inversion", timeout_in_seconds=360, delete_disposable_files="all"
)
p.viz.nb.inversion(inverse_problem_configuration="my_third_inversion")
[2024-11-20 13:27:11,624] INFO: Adding new iteration #0.
[2024-11-20 13:27:11,636] INFO: Resuming iteration #0.

[2024-11-20 13:27:11,637] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:11,637] INFO: Processing task `misfit_and_gradient`
[2024-11-20 13:27:12,144] INFO: 
Iteration 0: Number of events: 5	 chi = 0.018681064754203797	 ||g|| = 0.022700663670338374
pred = ---	ared = ---	norm_update = ---	tr_radius = ---
[2024-11-20 13:27:12,145] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:12,146] INFO: Processing task `preconditioner`

[2024-11-20 13:27:12,278] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:12,318] INFO: Processing task `preconditioner`
[2024-11-20 13:27:12,406] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:12,429] INFO: Processing task `preconditioner`
[2024-11-20 13:27:12,501] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:12,520] INFO: Processing task `preconditioner`
[2024-11-20 13:27:12,594] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:12,615] INFO: Processing task `preconditioner`
[2024-11-20 13:27:12,701] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:12,728] INFO: Processing task `preconditioner`
[2024-11-20 13:27:12,800] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:12,827] INFO: Processing task `preconditioner`
[2024-11-20 13:27:12,895] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:12,918] INFO: Processing task `preconditioner`
[2024-11-20 13:27:12,981] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,009] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,093] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,119] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,197] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,228] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,328] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,356] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,428] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,456] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,554] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,585] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,675] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,702] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,769] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,796] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,868] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,896] INFO: Processing task `preconditioner`
[2024-11-20 13:27:13,973] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:13,994] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,055] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,089] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,144] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,164] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,240] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,271] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,362] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,396] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,490] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,521] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,610] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,645] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,739] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,770] INFO: Processing task `preconditioner`
[2024-11-20 13:27:14,852] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:14,892] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,002] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,038] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,142] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,181] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,279] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,323] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,400] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,437] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,524] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,559] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,646] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,682] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,782] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,826] INFO: Processing task `preconditioner`
[2024-11-20 13:27:15,929] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:15,963] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,074] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:16,108] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,193] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:16,238] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,324] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:16,365] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,450] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:16,490] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,579] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:16,612] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,730] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:16,795] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,878] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:16,898] INFO: Processing task `preconditioner`
[2024-11-20 13:27:16,996] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:17,042] INFO: Processing task `preconditioner`
[2024-11-20 13:27:17,168] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:17,205] INFO: Processing task `preconditioner`
[2024-11-20 13:27:17,299] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:17,335] INFO: Processing task `preconditioner`
[2024-11-20 13:27:17,396] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:17,416] INFO: Processing task `preconditioner`
[2024-11-20 13:27:17,467] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:17,490] INFO: Processing task `preconditioner`
[2024-11-20 13:27:17,550] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:17,571] INFO: Processing task `preconditioner`
[2024-11-20 13:27:17,635] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:17,655] INFO: Processing task `preconditioner`
[2024-11-20 13:27:17,894] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:17,895] INFO: Processing task `misfit`
[2024-11-20 13:27:17,975] INFO: Submitting job array with 5 jobs ...

[2024-11-20 13:27:18,201] INFO: Launched simulations for 5 events. Please check again to see if they are finished.
[2024-11-20 13:27:18,203] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:18,357] INFO: Processing task `misfit`
[2024-11-20 13:27:18,493] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:18,529] INFO: Processing task `misfit`
[2024-11-20 13:27:18,622] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:18,691] INFO: Processing task `misfit`
[2024-11-20 13:27:19,283] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:19,346] INFO: Processing task `misfit`
[2024-11-20 13:27:19,486] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:19,573] INFO: Processing task `misfit`
[2024-11-20 13:27:19,677] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:19,715] INFO: Processing task `misfit`
[2024-11-20 13:27:19,809] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:19,872] INFO: Processing task `misfit`
[2024-11-20 13:27:19,977] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:20,061] INFO: Processing task `misfit`
[2024-11-20 13:27:20,179] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:20,255] INFO: Processing task `misfit`
[2024-11-20 13:27:20,354] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:20,415] INFO: Processing task `misfit`
[2024-11-20 13:27:20,510] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:20,577] INFO: Processing task `misfit`
[2024-11-20 13:27:20,709] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:20,783] INFO: Processing task `misfit`
[2024-11-20 13:27:20,899] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:21,006] INFO: Processing task `misfit`
[2024-11-20 13:27:21,121] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:21,184] INFO: Processing task `misfit`
[2024-11-20 13:27:21,306] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:21,366] INFO: Processing task `misfit`
[2024-11-20 13:27:21,494] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:21,526] INFO: Processing task `misfit`
[2024-11-20 13:27:21,963] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:22,031] INFO: Processing task `misfit`
[2024-11-20 13:27:22,124] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:22,189] INFO: Processing task `misfit`
[2024-11-20 13:27:22,272] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:22,318] INFO: Processing task `misfit`
[2024-11-20 13:27:22,451] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:22,530] INFO: Processing task `misfit`
[2024-11-20 13:27:22,613] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:22,666] INFO: Processing task `misfit`
[2024-11-20 13:27:22,742] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:22,785] INFO: Processing task `misfit`
[2024-11-20 13:27:22,861] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:22,904] INFO: Processing task `misfit`
[2024-11-20 13:27:22,981] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:23,023] INFO: Processing task `misfit`
[2024-11-20 13:27:23,099] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:23,142] INFO: Processing task `misfit`
[2024-11-20 13:27:23,218] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:23,266] INFO: Processing task `misfit`
[2024-11-20 13:27:23,389] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:23,467] INFO: Processing task `misfit`
[2024-11-20 13:27:23,615] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:23,678] INFO: Processing task `misfit`
[2024-11-20 13:27:24,286] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:24,323] INFO: Processing task `misfit`
[2024-11-20 13:27:24,400] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:24,491] INFO: Processing task `misfit`
[2024-11-20 13:27:24,634] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:24,701] INFO: Processing task `misfit`
[2024-11-20 13:27:24,889] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:24,935] INFO: Processing task `misfit`
[2024-11-20 13:27:25,044] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:25,112] INFO: Processing task `misfit`
[2024-11-20 13:27:25,217] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:25,260] INFO: Processing task `misfit`
[2024-11-20 13:27:25,336] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:25,379] INFO: Processing task `misfit`
[2024-11-20 13:27:25,466] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:25,510] INFO: Processing task `misfit`
[2024-11-20 13:27:25,589] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:25,631] INFO: Processing task `misfit`
[2024-11-20 13:27:25,708] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:25,754] INFO: Processing task `misfit`
[2024-11-20 13:27:25,829] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:25,870] INFO: Processing task `misfit`
[2024-11-20 13:27:25,945] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:26,000] INFO: Processing task `misfit`
[2024-11-20 13:27:26,097] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:26,180] INFO: Processing task `misfit`
[2024-11-20 13:27:26,566] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:26,612] INFO: Processing task `misfit`
[2024-11-20 13:27:26,714] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:26,820] INFO: Processing task `misfit`
[2024-11-20 13:27:26,985] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:27,029] INFO: Processing task `misfit`
[2024-11-20 13:27:27,157] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:27,237] INFO: Processing task `misfit`
[2024-11-20 13:27:27,396] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:27,489] INFO: Processing task `misfit`
[2024-11-20 13:27:27,656] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:27,729] INFO: Processing task `misfit`
[2024-11-20 13:27:27,816] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:27,894] INFO: Processing task `misfit`
[2024-11-20 13:27:27,989] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:28,067] INFO: Processing task `misfit`
[2024-11-20 13:27:28,198] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:28,268] INFO: Processing task `misfit`
[2024-11-20 13:27:28,400] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:28,493] INFO: Processing task `misfit`
[2024-11-20 13:27:28,648] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:28,732] INFO: Processing task `misfit`
[2024-11-20 13:27:28,855] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:28,897] INFO: Processing task `misfit`
[2024-11-20 13:27:31,720] INFO: 
old misfit control group: 0.018681064754203797
new misfit control group: 0.009266712628118857
predicted reduction control group: -0.005269264615522084
actual reduction control group: -0.00941435212608494
5 out of 5 event(s) improved the misfit.
[2024-11-20 13:27:31,720] INFO: 
Model update accepted.
[2024-11-20 13:27:31,724] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:31,725] INFO: Processing task `finalize_iteration`
[2024-11-20 13:27:31,803] INFO: ... searching for obsolete files in project/INVERSIONS/my_third_inversion/00000
[2024-11-20 13:27:31,822] INFO: Freed up 1.2 MB of space.
[2024-11-20 13:27:31,823] INFO: Succesfully completed iteration #0.
[2024-11-20 13:27:31,825] INFO: Adding new iteration #1.
The example above is just meant to demonstrate the use of box constraints. For cases where lower and upper bounds are (almost) equal, we recommend using a region of interest instead.

Postprocessing model updates

It is sometimes helpful to let prior knowledge influence the model updates. There are inherent differences in the sensitivity with respect to the magnitude of some parameters, but we might use physical knowledge such as scaling relations between the parameters to tweak the proposed models. This can be achieved by a callback within the mapping function. In the following example, we only invert for VP, but use the following scaling relation for soft tissues to update RHO:
def scaling_relation_density(
    prior_model: sn.UnstructuredMesh,
    proposed_model: sn.UnstructuredMesh,
) -> sn.UnstructuredMesh:

    # Here we directly apply a scaling relation to the density model.
    # We don't need the prior model in this case.

    new_model = proposed_model.copy()
    new_model.elemental_fields["RHO"] = (
        0.893 * new_model.elemental_fields["VP"] - 349.0
    )

    return new_model
This callback will modify proposed model updates before recomputing the misfits. Strictly speaking, this results in inconsistent gradients, because we neglect density as an inversion parameter but because of the low sensitivity to density amplitudes, this does not impact the trust region algorithm much.
p += sn.InverseProblemConfiguration(
    name="my_fourth_inversion",
    prior_model="initial_model",
    events=p.events.list(),
    mapping=sn.Mapping(
        scaling="absolute",
        inversion_parameters=[
            "VP",
        ],
        postprocess_model_update=scaling_relation_density,
    ),
    preconditioner=sn.ConstantSmoothing({"VP": 0.01}),
    method=sn.TrustRegion(initial_trust_region_linf=10.0),
    misfit_configuration="L2",
    wavefield_compression=sn.WavefieldCompression(
        forward_wavefield_sampling_interval=10
    ),
    job_submission=sn.SiteConfig(
        site_name=SALVUS_FLOW_SITE_NAME, ranks_per_job=4
    ),
)
# Will be removed for the website.
p.inversions.set_stopping_criteria(
    inverse_problem_configuration="my_fourth_inversion",
    criteria={"max_iterations_global": 2},
)
p.inversions.iterate(
    "my_fourth_inversion",
    timeout_in_seconds=360,
    delete_disposable_files="all",
)
p.viz.nb.inversion(inverse_problem_configuration="my_fourth_inversion")
[2024-11-20 13:27:33,091] INFO: Adding new iteration #0.
[2024-11-20 13:27:33,106] INFO: Resuming iteration #0.

[2024-11-20 13:27:33,107] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:33,107] INFO: Processing task `misfit_and_gradient`
[2024-11-20 13:27:33,589] INFO: 
Iteration 0: Number of events: 5	 chi = 0.018681064754203797	 ||g|| = 0.02159122070536007
pred = ---	ared = ---	norm_update = ---	tr_radius = ---
[2024-11-20 13:27:33,590] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:33,590] INFO: Processing task `preconditioner`

[2024-11-20 13:27:33,718] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:33,759] INFO: Processing task `preconditioner`
[2024-11-20 13:27:33,844] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:33,879] INFO: Processing task `preconditioner`
[2024-11-20 13:27:33,959] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:33,978] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,049] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,076] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,153] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,175] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,246] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,276] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,355] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,387] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,495] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,528] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,602] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,639] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,727] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,755] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,828] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,852] INFO: Processing task `preconditioner`
[2024-11-20 13:27:34,914] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:34,944] INFO: Processing task `preconditioner`
[2024-11-20 13:27:35,018] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:35,045] INFO: Processing task `preconditioner`
[2024-11-20 13:27:35,118] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:35,139] INFO: Processing task `preconditioner`
[2024-11-20 13:27:35,327] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:35,327] INFO: Processing task `misfit`
[2024-11-20 13:27:35,414] INFO: Submitting job array with 5 jobs ...

[2024-11-20 13:27:35,600] INFO: Launched simulations for 5 events. Please check again to see if they are finished.
[2024-11-20 13:27:35,601] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:35,651] INFO: Processing task `misfit`
[2024-11-20 13:27:35,750] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:35,789] INFO: Processing task `misfit`
[2024-11-20 13:27:35,873] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:35,925] INFO: Processing task `misfit`
[2024-11-20 13:27:36,041] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:36,132] INFO: Processing task `misfit`
[2024-11-20 13:27:36,285] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:36,357] INFO: Processing task `misfit`
[2024-11-20 13:27:36,511] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:36,568] INFO: Processing task `misfit`
[2024-11-20 13:27:36,694] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:36,760] INFO: Processing task `misfit`
[2024-11-20 13:27:36,915] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:36,976] INFO: Processing task `misfit`
[2024-11-20 13:27:37,502] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:37,550] INFO: Processing task `misfit`
[2024-11-20 13:27:37,687] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:37,745] INFO: Processing task `misfit`
[2024-11-20 13:27:37,851] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:37,896] INFO: Processing task `misfit`
[2024-11-20 13:27:37,998] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:38,054] INFO: Processing task `misfit`
[2024-11-20 13:27:38,159] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:38,207] INFO: Processing task `misfit`
[2024-11-20 13:27:38,314] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:38,409] INFO: Processing task `misfit`
[2024-11-20 13:27:38,573] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:38,746] INFO: Processing task `misfit`
[2024-11-20 13:27:39,005] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:39,056] INFO: Processing task `misfit`
[2024-11-20 13:27:39,166] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:39,236] INFO: Processing task `misfit`
[2024-11-20 13:27:39,430] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:39,490] INFO: Processing task `misfit`
[2024-11-20 13:27:39,632] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:39,696] INFO: Processing task `misfit`
[2024-11-20 13:27:39,811] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:39,880] INFO: Processing task `misfit`
[2024-11-20 13:27:39,983] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:40,057] INFO: Processing task `misfit`
[2024-11-20 13:27:40,193] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:40,262] INFO: Processing task `misfit`
[2024-11-20 13:27:40,398] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:40,463] INFO: Processing task `misfit`
[2024-11-20 13:27:40,593] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:40,648] INFO: Processing task `misfit`
[2024-11-20 13:27:40,764] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:40,811] INFO: Processing task `misfit`
[2024-11-20 13:27:40,898] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:40,967] INFO: Processing task `misfit`
[2024-11-20 13:27:41,316] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:41,368] INFO: Processing task `misfit`
[2024-11-20 13:27:41,448] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:41,513] INFO: Processing task `misfit`
[2024-11-20 13:27:41,629] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:41,691] INFO: Processing task `misfit`
[2024-11-20 13:27:41,836] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:41,896] INFO: Processing task `misfit`
[2024-11-20 13:27:42,001] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:42,069] INFO: Processing task `misfit`
[2024-11-20 13:27:42,192] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:42,256] INFO: Processing task `misfit`
[2024-11-20 13:27:42,368] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:42,421] INFO: Processing task `misfit`
[2024-11-20 13:27:42,553] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:42,617] INFO: Processing task `misfit`
[2024-11-20 13:27:42,752] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:42,830] INFO: Processing task `misfit`
[2024-11-20 13:27:42,939] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:43,000] INFO: Processing task `misfit`
[2024-11-20 13:27:43,100] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:43,169] INFO: Processing task `misfit`
[2024-11-20 13:27:43,260] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:43,295] INFO: Processing task `misfit`
[2024-11-20 13:27:43,387] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:43,460] INFO: Processing task `misfit`
[2024-11-20 13:27:43,601] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:43,669] INFO: Processing task `misfit`
[2024-11-20 13:27:43,795] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:43,857] INFO: Processing task `misfit`
[2024-11-20 13:27:43,943] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:43,990] INFO: Processing task `misfit`
[2024-11-20 13:27:44,088] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:44,163] INFO: Processing task `misfit`
[2024-11-20 13:27:44,270] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:44,336] INFO: Processing task `misfit`
[2024-11-20 13:27:44,455] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:44,537] INFO: Processing task `misfit`
[2024-11-20 13:27:44,969] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:45,030] INFO: Processing task `misfit`
[2024-11-20 13:27:45,162] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:45,239] INFO: Processing task `misfit`
[2024-11-20 13:27:45,374] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:45,457] INFO: Processing task `misfit`
[2024-11-20 13:27:45,563] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:45,600] INFO: Processing task `misfit`
[2024-11-20 13:27:45,706] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:45,773] INFO: Processing task `misfit`
[2024-11-20 13:27:45,865] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:45,934] INFO: Processing task `misfit`
[2024-11-20 13:27:46,043] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:46,111] INFO: Processing task `misfit`
[2024-11-20 13:27:46,202] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:46,281] INFO: Processing task `misfit`
[2024-11-20 13:27:46,434] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:46,497] INFO: Processing task `misfit`
[2024-11-20 13:27:46,600] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:46,663] INFO: Processing task `misfit`
[2024-11-20 13:27:46,794] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:46,853] INFO: Processing task `misfit`
[2024-11-20 13:27:46,983] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:47,058] INFO: Processing task `misfit`
[2024-11-20 13:27:47,214] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:47,293] INFO: Processing task `misfit`
[2024-11-20 13:27:47,441] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:47,477] INFO: Processing task `misfit`
[2024-11-20 13:27:47,585] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:47,627] INFO: Processing task `misfit`
[2024-11-20 13:27:47,722] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:47,758] INFO: Processing task `misfit`
[2024-11-20 13:27:47,847] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:47,889] INFO: Processing task `misfit`
[2024-11-20 13:27:48,003] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:48,084] INFO: Processing task `misfit`
[2024-11-20 13:27:48,217] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:48,291] INFO: Processing task `misfit`
[2024-11-20 13:27:48,707] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:48,756] INFO: Processing task `misfit`
[2024-11-20 13:27:48,855] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:48,908] INFO: Processing task `misfit`
[2024-11-20 13:27:49,064] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:49,131] INFO: Processing task `misfit`
[2024-11-20 13:27:49,250] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:49,294] INFO: Processing task `misfit`
[2024-11-20 13:27:49,404] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:49,459] INFO: Processing task `misfit`
[2024-11-20 13:27:49,589] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:49,657] INFO: Processing task `misfit`
[2024-11-20 13:27:49,770] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:49,811] INFO: Processing task `misfit`
[2024-11-20 13:27:49,927] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:49,989] INFO: Processing task `misfit`
[2024-11-20 13:27:50,115] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:50,179] INFO: Processing task `misfit`
[2024-11-20 13:27:50,298] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:50,372] INFO: Processing task `misfit`
[2024-11-20 13:27:50,489] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:50,566] INFO: Processing task `misfit`
[2024-11-20 13:27:50,670] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:50,723] INFO: Processing task `misfit`
[2024-11-20 13:27:50,820] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:50,890] INFO: Processing task `misfit`
[2024-11-20 13:27:50,979] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:51,037] INFO: Processing task `misfit`
[2024-11-20 13:27:51,124] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:51,168] INFO: Processing task `misfit`
[2024-11-20 13:27:51,271] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:51,310] INFO: Processing task `misfit`
[2024-11-20 13:27:51,436] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:51,510] INFO: Processing task `misfit`
[2024-11-20 13:27:51,619] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:51,683] INFO: Processing task `misfit`
[2024-11-20 13:27:51,792] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:51,863] INFO: Processing task `misfit`
[2024-11-20 13:27:52,264] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:52,328] INFO: Processing task `misfit`
[2024-11-20 13:27:52,432] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:52,491] INFO: Processing task `misfit`
[2024-11-20 13:27:52,583] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:52,656] INFO: Processing task `misfit`
[2024-11-20 13:27:52,782] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:52,855] INFO: Processing task `misfit`
[2024-11-20 13:27:52,952] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:53,026] INFO: Processing task `misfit`
[2024-11-20 13:27:53,115] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:53,182] INFO: Processing task `misfit`
[2024-11-20 13:27:53,278] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:53,346] INFO: Processing task `misfit`
[2024-11-20 13:27:53,478] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:53,540] INFO: Processing task `misfit`
[2024-11-20 13:27:53,666] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:53,741] INFO: Processing task `misfit`
[2024-11-20 13:27:53,847] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:53,920] INFO: Processing task `misfit`
[2024-11-20 13:27:54,020] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:54,092] INFO: Processing task `misfit`
[2024-11-20 13:27:54,207] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2024-11-20 13:27:54,261] INFO: Processing task `misfit`
[2024-11-20 13:27:56,915] INFO: 
old misfit control group: 0.018681064754203797
new misfit control group: 0.007324120186341101
predicted reduction control group: -0.009520467601654339
actual reduction control group: -0.011356944567862695
5 out of 5 event(s) improved the misfit.
[2024-11-20 13:27:56,918] INFO: 
Model update accepted.
[2024-11-20 13:27:56,919] INFO: 1 new tasks have been issued.
[2024-11-20 13:27:56,919] INFO: Processing task `finalize_iteration`
[2024-11-20 13:27:56,996] INFO: ... searching for obsolete files in project/INVERSIONS/my_fourth_inversion/00000
[2024-11-20 13:27:57,028] INFO: Freed up 1.1 MB of space.
[2024-11-20 13:27:57,028] INFO: Succesfully completed iteration #0.
[2024-11-20 13:27:57,030] INFO: Adding new iteration #1.
Remember that we only invert for VP, so the gradients with respect to RHO don't enter the optimization. Nevertheless, we can see the updated density values when inspecting the absolute parameters in the mesh.
p.simulations.get_mesh(
    p.inversions.get_simulation_name(
        inverse_problem_configuration="my_fourth_inversion", iteration_id=1
    )
)
<salvus.mesh.data_structures.unstructured_mesh.unstructured_mesh.UnstructuredMesh object at 0x713257762590>
PAGE CONTENTS