This documentation is not for the latest stable Salvus version.
%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")
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)
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",
)
[2025-04-15 20:04:14,421] INFO: Adding new iteration #0. [2025-04-15 20:04:14,438] INFO: Resuming iteration #0. [2025-04-15 20:04:14,439] INFO: 1 new tasks have been issued. [2025-04-15 20:04:14,439] INFO: Processing task `misfit_and_gradient` [2025-04-15 20:04:14,791] INFO: Iteration 0: Number of events: 5 chi = 0.018681064754203797 ||g|| = 0.016366358801050206 pred = --- ared = --- norm_update = --- tr_radius = --- [2025-04-15 20:04:14,792] INFO: 1 new tasks have been issued. [2025-04-15 20:04:14,792] INFO: Processing task `preconditioner` [2025-04-15 20:04:14,973] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:04:24,986] INFO: Processing task `preconditioner` [2025-04-15 20:04:25,169] INFO: 1 new tasks have been issued. [2025-04-15 20:04:25,170] INFO: Processing task `misfit` [2025-04-15 20:04:25,236] INFO: Submitting job array with 5 jobs ... [2025-04-15 20:04:25,355] INFO: Launched simulations for 5 events. Please check again to see if they are finished. [2025-04-15 20:04:25,357] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:04:35,389] INFO: Processing task `misfit` [2025-04-15 20:04:38,093] 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. [2025-04-15 20:04:38,093] INFO: Model update accepted. [2025-04-15 20:04:38,095] INFO: 1 new tasks have been issued. [2025-04-15 20:04:38,095] INFO: Processing task `finalize_iteration` [2025-04-15 20:04:38,157] INFO: ... searching for obsolete files in project/INVERSIONS/my_second_inversion/00000 [2025-04-15 20:04:38,180] INFO: Freed up 1.2 MB of space. [2025-04-15 20:04:38,180] INFO: Succesfully completed iteration #0. [2025-04-15 20:04:38,182] INFO: Adding new iteration #1.
p.viz.nb.inversion(inverse_problem_configuration="my_second_inversion")
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")
[2025-04-15 20:04:39,562] INFO: Resuming iteration #1. [2025-04-15 20:04:39,562] INFO: 1 new tasks have been issued. [2025-04-15 20:04:39,563] INFO: Processing task `gradient` [2025-04-15 20:04:39,775] INFO: Submitting job array with 5 jobs ...
Uploading 1 files... Uploading 1 files... Uploading 1 files... Uploading 1 files... Uploading 1 files... [2025-04-15 20:04:39,832] INFO: Launched adjoint simulations for 5 events. Please check again to see if they are finished. [2025-04-15 20:04:39,833] INFO: Some tasks of iteration #1 are still running. Please check again later. [2025-04-15 20:04:49,835] INFO: Processing task `gradient` [2025-04-15 20:04:50,294] INFO: 5 events have already been submitted. They will not be submitted again. [2025-04-15 20:04:50,808] 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 [2025-04-15 20:04:50,824] INFO: 1 new tasks have been issued. [2025-04-15 20:04:50,824] INFO: Processing task `preconditioner` [2025-04-15 20:04:50,948] INFO: Some tasks of iteration #1 are still running. Please check again later. [2025-04-15 20:05:00,989] INFO: Processing task `preconditioner` [2025-04-15 20:05:01,177] INFO: 1 new tasks have been issued. [2025-04-15 20:05:01,177] INFO: Processing task `misfit` [2025-04-15 20:05:01,243] INFO: Submitting job array with 5 jobs ... [2025-04-15 20:05:01,427] INFO: Launched simulations for 5 events. Please check again to see if they are finished. [2025-04-15 20:05:01,428] INFO: Some tasks of iteration #1 are still running. Please check again later. [2025-04-15 20:05:11,487] INFO: Processing task `misfit` [2025-04-15 20:05:13,716] 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. [2025-04-15 20:05:13,716] INFO: Model update accepted. [2025-04-15 20:05:13,717] INFO: 1 new tasks have been issued. [2025-04-15 20:05:13,717] INFO: Processing task `finalize_iteration` [2025-04-15 20:05:13,816] INFO: ... searching for obsolete files in project/INVERSIONS/my_second_inversion/00001 [2025-04-15 20:05:14,009] INFO: Freed up 4.8 MB of space. [2025-04-15 20:05:14,010] INFO: Succesfully completed iteration #1. [2025-04-15 20:05:14,012] INFO: Adding new iteration #2. [2025-04-15 20:05:14,020] INFO: Resuming iteration #2. [2025-04-15 20:05:14,021] INFO: 1 new tasks have been issued. [2025-04-15 20:05:14,021] INFO: Processing task `gradient` [2025-04-15 20:05:14,317] INFO: Submitting job array with 5 jobs ...
Uploading 1 files... Uploading 1 files... Uploading 1 files... Uploading 1 files... Uploading 1 files... [2025-04-15 20:05:14,416] INFO: Launched adjoint simulations for 5 events. Please check again to see if they are finished. [2025-04-15 20:05:14,418] INFO: Some tasks of iteration #2 are still running. Please check again later. [2025-04-15 20:05:24,422] INFO: Processing task `gradient` [2025-04-15 20:05:24,571] INFO: 5 events have already been submitted. They will not be submitted again. [2025-04-15 20:05:25,028] 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 [2025-04-15 20:05:25,044] INFO: 1 new tasks have been issued. [2025-04-15 20:05:25,044] INFO: Processing task `preconditioner` [2025-04-15 20:05:25,151] INFO: Some tasks of iteration #2 are still running. Please check again later. [2025-04-15 20:05:35,205] INFO: Processing task `preconditioner` [2025-04-15 20:05:35,375] INFO: 1 new tasks have been issued. [2025-04-15 20:05:35,376] INFO: Processing task `misfit` [2025-04-15 20:05:35,434] INFO: Submitting job array with 5 jobs ... [2025-04-15 20:05:35,560] INFO: Launched simulations for 5 events. Please check again to see if they are finished. [2025-04-15 20:05:35,562] INFO: Some tasks of iteration #2 are still running. Please check again later. [2025-04-15 20:05:45,634] INFO: Processing task `misfit` [2025-04-15 20:05:47,427] 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. [2025-04-15 20:05:47,427] INFO: Model update accepted. [2025-04-15 20:05:47,428] INFO: 1 new tasks have been issued. [2025-04-15 20:05:47,428] INFO: Processing task `finalize_iteration` [2025-04-15 20:05:47,518] INFO: ... searching for obsolete files in project/INVERSIONS/my_second_inversion/00002 [2025-04-15 20:05:47,664] INFO: Freed up 6.0 MB of space. [2025-04-15 20:05:47,664] INFO: Succesfully completed iteration #2. [2025-04-15 20:05:47,667] INFO: Adding new iteration #3.
VP
and RHO
, except for the
previously selected region of interest, where we restrict VP
updates to +/- 1 m/s.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")
[2025-04-15 20:05:48,693] INFO: Adding new iteration #0. [2025-04-15 20:05:48,701] INFO: Resuming iteration #0. [2025-04-15 20:05:48,701] INFO: 1 new tasks have been issued. [2025-04-15 20:05:48,701] INFO: Processing task `misfit_and_gradient` [2025-04-15 20:05:49,023] INFO: Iteration 0: Number of events: 5 chi = 0.018681064754203797 ||g|| = 0.022700663670338374 pred = --- ared = --- norm_update = --- tr_radius = --- [2025-04-15 20:05:49,024] INFO: 1 new tasks have been issued. [2025-04-15 20:05:49,024] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,091] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,107] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,150] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,161] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,196] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,208] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,242] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,259] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,303] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,321] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,361] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,378] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,442] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,488] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,545] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,565] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,615] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,632] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,682] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,702] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,757] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,774] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,822] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,839] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,887] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,905] INFO: Processing task `preconditioner` [2025-04-15 20:05:49,954] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:49,969] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,023] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,041] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,085] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,101] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,147] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,163] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,208] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,236] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,296] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,315] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,371] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,386] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,437] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,455] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,504] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,520] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,577] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,594] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,645] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,664] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,715] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,746] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,792] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:50,807] INFO: Processing task `preconditioner` [2025-04-15 20:05:50,973] INFO: 1 new tasks have been issued. [2025-04-15 20:05:50,974] INFO: Processing task `misfit` [2025-04-15 20:05:51,037] INFO: Submitting job array with 5 jobs ... [2025-04-15 20:05:51,158] INFO: Launched simulations for 5 events. Please check again to see if they are finished. [2025-04-15 20:05:51,159] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:51,191] INFO: Processing task `misfit` [2025-04-15 20:05:51,254] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:51,283] INFO: Processing task `misfit` [2025-04-15 20:05:51,352] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:51,376] INFO: Processing task `misfit` [2025-04-15 20:05:51,436] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:51,460] INFO: Processing task `misfit` [2025-04-15 20:05:51,734] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:51,758] INFO: Processing task `misfit` [2025-04-15 20:05:51,825] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:51,860] INFO: Processing task `misfit` [2025-04-15 20:05:51,922] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:51,945] INFO: Processing task `misfit` [2025-04-15 20:05:52,013] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:52,042] INFO: Processing task `misfit` [2025-04-15 20:05:52,113] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:52,146] INFO: Processing task `misfit` [2025-04-15 20:05:52,215] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:52,242] INFO: Processing task `misfit` [2025-04-15 20:05:52,311] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:52,346] INFO: Processing task `misfit` [2025-04-15 20:05:52,423] INFO: Some tasks of iteration #0 are still running. Please check again later.
[2025-04-15 20:05:52,447] INFO: Processing task `misfit` [2025-04-15 20:05:52,517] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:52,554] INFO: Processing task `misfit` [2025-04-15 20:05:52,612] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:52,639] INFO: Processing task `misfit` [2025-04-15 20:05:52,700] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:52,732] INFO: Processing task `misfit` [2025-04-15 20:05:53,045] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,072] INFO: Processing task `misfit` [2025-04-15 20:05:53,132] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,158] INFO: Processing task `misfit` [2025-04-15 20:05:53,247] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,276] INFO: Processing task `misfit` [2025-04-15 20:05:53,353] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,386] INFO: Processing task `misfit` [2025-04-15 20:05:53,459] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,489] INFO: Processing task `misfit` [2025-04-15 20:05:53,554] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,585] INFO: Processing task `misfit` [2025-04-15 20:05:53,642] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,670] INFO: Processing task `misfit` [2025-04-15 20:05:53,732] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,761] INFO: Processing task `misfit` [2025-04-15 20:05:53,828] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,860] INFO: Processing task `misfit` [2025-04-15 20:05:53,928] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:53,959] INFO: Processing task `misfit` [2025-04-15 20:05:54,024] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:54,055] INFO: Processing task `misfit` [2025-04-15 20:05:54,390] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:54,423] INFO: Processing task `misfit` [2025-04-15 20:05:54,496] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:54,530] INFO: Processing task `misfit` [2025-04-15 20:05:54,602] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:54,635] INFO: Processing task `misfit` [2025-04-15 20:05:54,700] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:54,731] INFO: Processing task `misfit` [2025-04-15 20:05:54,800] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:54,828] INFO: Processing task `misfit` [2025-04-15 20:05:54,887] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:54,920] INFO: Processing task `misfit` [2025-04-15 20:05:54,988] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:55,018] INFO: Processing task `misfit` [2025-04-15 20:05:55,079] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:55,110] INFO: Processing task `misfit` [2025-04-15 20:05:55,160] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:55,184] INFO: Processing task `misfit` [2025-04-15 20:05:55,236] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:55,260] INFO: Processing task `misfit` [2025-04-15 20:05:55,316] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:55,348] INFO: Processing task `misfit` [2025-04-15 20:05:55,662] INFO: Some tasks of iteration #0 are still running. Please check again later. [2025-04-15 20:05:55,685] INFO: Processing task `misfit` [2025-04-15 20:05:57,329] 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. [2025-04-15 20:05:57,329] INFO: Model update accepted. [2025-04-15 20:05:57,329] INFO: 1 new tasks have been issued. [2025-04-15 20:05:57,329] INFO: Processing task `finalize_iteration` [2025-04-15 20:05:57,375] INFO: ... searching for obsolete files in project/INVERSIONS/my_third_inversion/00000 [2025-04-15 20:05:57,386] INFO: Freed up 1.2 MB of space. [2025-04-15 20:05:57,387] INFO: Succesfully completed iteration #0. [2025-04-15 20:05:57,388] INFO: Adding new iteration #1.
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
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
),
)