Salvus 0.11.15
This release features a revamp of the mesh masking interface to be more flexible as well as easier to use. Additionally it contains a first version of global and continental scale wavefield adapted SmoothieSEM meshes.
Furthermore it includes a new receiver collection and the ability to retrieve
detailed misfit information from an EventMisfit object. Last but not least
it includes a bugfix for gradients in meshes employing the region-of-interest
feature while using nontrivial checkpoints.
For the experimental SalvusProject packages it contains a number of quality-of-life to visualize and understand misfits in more detail as well as a number of bugfixes and some polish.
This update has no user facing breaking changes (aside the mesh masking) so we recommend this update to all users.
Changes
Bugfix for the region of interest in adjoint runs with nontrivial checkpoints.
New EventMisfit.misfit_per_receiver_and_component_and_weight_set attribute
to yield a more detailed view of how the misfit for a single event is
computed.
In [1]: ed.misfit_per_receiver_and_component_and_weight_set
Out [1]:
{'XX.A0000.': {'Z': [0.00088682823102153761],
'N': [0.000256782248385296],
'E': [0.00012302960702887129, 0.0004303495400]},
'XX.A0001.': {'Z': [0.0010641578304181843],
'N': [0.00025058292454050639],
'E': [0.00012369945631215902]},
...
}New simple_config.receiver.seismology.collections.SideSetGridPoint3D
receiver collection.
lat_c, lon_c = 45.0, 10.0
lat_e, lon_e = 15.0, 18.0
receivers = sn.simple_config.receiver.seismology.collections.SideSetGridPoint3D(
lat_center=lat_c,
lat_extent=lat_e * 0.9,
lon_center=lon_c,
lon_extent=lon_e * 0.9,
fields=["displacement"],
n_lat=10,
n_lon=10,
)
New method UnstructuredMesh.get_side_set_nodes() to get all nodes in a side
set.
New mask generators (SurfaceMaskGenerator, RayMaskGenerator) replacing
the existing JSON based masking interface.
They are now applied via the processing_function argument to the
central run_mesher() function.
We expect this to only affect a small number of users.
Added the ability to generate wavefield adaptive spectral-element meshes
which we refer to as SmoothieSEM.
sm = sn.simple_mesh.SmoothieSEM()
sm.basic.model = "prem_iso_one_crust"
sm.basic.min_period_in_seconds = 200.0
sm.basic.elements_per_wavelength = 2.0
sm.basic.number_of_lateral_elements = 4
sm.advanced.tensor_order = 2
sm.source.latitude = 35.0
sm.source.longitude = 12.0
Changes to Experimental Features
Warn when receiver fields other than "displacement" or "phi" are used in
a MisfitConfiguration object. Otherwise the adjoint sources are currently
not fully consistent.
New p.misfits.get_misfit_comparison_table() method yielding a
pandas.DataFrame containing detailed per-receiver misfit information that
can be used for further custom analysis.
In [1]: p.misfits.get_misfit_comparison_table(
reference_data="initial_model",
other_data=[
p.inversions.get_simulation_name(
inverse_problem_configuration="inv", iteration_id=4
)
],
misfit_configuration="L2-misfit-to-target-model",
event="event_0000",
)
Out [1]:
initial_model (ref) inv_it_3__trial Reduction inv_it_3__trial
XX.A0000. 1.266640e-03 0.000224 0.001043
XX.A0001. 1.438440e-03 0.000361 0.001078
XX.A0002. 1.450685e-03 0.000369 0.001081
XX.A0003. 1.607995e-03 0.000430 0.001178
XX.A0004. 9.473526e-04 0.000238 0.000709
... ... ... ...
XX.A0095. 1.182061e-05 0.000065 -0.000053
XX.A0096. 1.360653e-06 0.000529 -0.000527
XX.A0097. 9.762485e-07 0.000102 -0.000101
XX.A0098. 4.663780e-06 0.000306 -0.000301
XX.A0099. 1.784453e-06 0.000165 -0.000163
[100 rows x 3 columns]New p.viz.nb.misfit_comparison() method to display the output from the
p.misfits.get_misfit_comparison_table() method in a pretty table.
p.viz.nb.misfit_comparison(
reference_data="initial_model",
other_data=[
p.inversions.get_simulation_name(
inverse_problem_configuration="inv", iteration_id=4
)
],
misfit_configuration="L2-misfit-to-target-model",
event=p.events.list()[0],
)
New p.viz.seismology.misfit_map() method to display the output from the
p.misfits.get_misfit_comparison_table() method on a geographical map.
p.viz.seismology.misfit_map(
reference_data="initial_model",
compare_data=p.inversions.get_simulation_name(
inverse_problem_configuration="inv", iteration_id=5
),
misfit_configuration="L2-misfit-to-target-model",
event=p.events.list()[0],
)
Can now delete entities, even if they cannot be instantiated anymore. Useful for certain edge cases.
Fully consistent is_point_in_domain() check for spherical chunk domains.
The map visualization for spherical chunks now also works for domains crossing the international date line.
sn.domain.dim3.SphericalChunkDomain(
lat_center=52.0,
lat_extent=16.0,
lon_center=170.0,
lon_extent=66.0,
radius_in_meter=6371000.0,
).plot()