salvus.project.components.visualization.notebook_visualization_component
salvus.project.components.visualization.notebook_visualization_component salvus project components visualization notebook_visualization_component The notebook visualization component.
Functions
get_gradients_widget()
get_gradients_widget()def get_gradients_widget(
project: Project,
simulation_configuration: str,
misfit_configuration: str,
wavefield_compression: WavefieldCompression,
events: (
str
| typing.Sequence[str]
| Event
| typing.Sequence[Event]
| EventCollection
| None
) = None,
html: bool = True,
) -> ipywidgets.VBox | None: ...Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
projectProject — Project.simulation_configurationstr — Name of the simulation configuration.misfit_configurationstr — Misfit configuration.wavefield_compressionWavefieldCompression — Wavefield compression settings.eventsstr | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None — List of events to plot (optional).htmlbool — Return html or widget.
get_inversion_widget()
get_inversion_widget()def get_inversion_widget(
project: Project, inverse_problem_configuration: str, html: bool = True
) -> ipywidgets.VBox | None: ...Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
projectProject — Project.inverse_problem_configurationstr — Name of the inverse problem.htmlbool — Return html or widget.
get_iteration_widget()
get_iteration_widget()def get_iteration_widget(
project: Project,
inverse_problem_configuration: str,
iteration_id: int,
html: bool = True,
) -> ipywidgets.VBox | None: ...Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
projectProject — Project.inverse_problem_configurationstr — Name of the inverse problem.iteration_idint — Iteration id.htmlbool — Return html or widget.
get_iterations_widget()
get_iterations_widget()def get_iterations_widget(
project: Project,
inverse_problem_configuration: str,
iteration_ids: typing.Sequence[int] | None = None,
html: bool = True,
) -> ipywidgets.VBox | None: ...Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
projectProject — Project.inverse_problem_configurationstr — Name of the inverse problem configuration.iteration_idstyping.Sequence[int] | None — Optional list of iteration IDs.htmlbool — Return html or widget.
Classes
NotebookVisualizationComponent
NotebookVisualizationComponentclass NotebookVisualizationComponent(builtins.object):
def __init__(self, project: Project): ...Jupyter notebook specific visualizations.
projectProject — The project to attach the component to.
domain()
domain()def domain(self) -> Domain: ...Visualize the domain including all events.
gradients()
gradients()def gradients(
self,
simulation_configuration: str,
misfit_configuration: str,
wavefield_compression: WavefieldCompression | None = None,
events: (
str
| typing.Sequence[str]
| Event
| typing.Sequence[Event]
| EventCollection
| None
) = None,
) -> None: ...Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
simulation_configurationstr — Name of the simulation configuration.misfit_configurationstr — Misfit configuration.wavefield_compressionWavefieldCompression | None — The wavefield compression settings.eventsstr | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None — List of events to plot (optional).
inversion()
inversion()def inversion(self, inverse_problem_configuration: str) -> None: ...Launch a notebook visualization of an inversion.
Plots and displays info about models, misfits, and more.
inverse_problem_configurationstr — Name of the inverse problem.
iteration()
iteration()def iteration(
self, inverse_problem_configuration: str, iteration_id: int
) -> None: ...Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
inverse_problem_configurationstr — Name of the inverse problem.iteration_idint — Iteration id.
misfit_comparison()
misfit_comparison()def misfit_comparison(
self,
reference_data: str,
other_data: list[str] | None = None,
misfit_configuration: str,
event: str | Event,
) -> typing.Any: ...Show a misfit comparison table comparing the misfit for one set of synthetics to one or more others.
reference_datastr — The synthetics for the baseline misfit.other_datalist[str] | None — One or more other misfits to be compared against the baseline. If not given it will just show the misfits for the reference data.misfit_configurationstr — The misfit configuration.eventstr | Event — The event to do it for.
misfits()
misfits()def misfits(
self,
simulation_configuration: str,
misfit_configuration: str,
events: (
str
| typing.Sequence[str]
| Event
| typing.Sequence[Event]
| EventCollection
| None
) = None,
) -> None: ...Visualize misfits in a jupyter notebook.
simulation_configurationstr — The simulation configuration to visualize.misfit_configurationstr — The misfit configuration to visualize.eventsstr | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None — events to include in the widget. If None, all events in the project are included.
simulation_setup()
simulation_setup()def simulation_setup(
self,
simulation_configuration: str,
events: (
str
| typing.Sequence[str]
| Event
| typing.Sequence[Event]
| EventCollection
| None
) = None,
) -> simple_config.simulation.Waveform | UnstructuredMesh: ...Launch a notebook visualization of a simulation configuration.
Plots the mesh, as well as the sources and receivers
simulation_configurationstr — Name of the simulation configuration.eventsstr | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None — List of events to plot.
waveforms()
waveforms()def waveforms(
self,
data: list[str] | str,
receiver_field: str,
data_selection_configuration: str | None = None,
) -> None: ...Waveform data comparison in the notebooks.
datalist[str] | str — List of data names to visualize. Allows piping data through processing functionality, e.g. “data_name|normalize”.receiver_fieldstr — The receiver field to use.data_selection_configurationstr | None — Name of the data selection configuration to apply/visualize.
Used in tutorials
- 2-D Global-scale simulations w/ heterogeneous models
- 3D-to-2D Conversion
- Acoustic simulations in isotropic and anisotropic media
- Attenuation
- Constructing the Starting Model
- Continental Scale FWI - Part 2: Forward simulations
- Continental Scale FWI Tutorial - Part 1: Project Setup & Data Acquisition
- Continental Scale FWI Tutorial - Part 3: Data selection and misfit definition
- Continental Scale FWI Tutorial - Part 4: Iterative inversion
- Continental-scale Simulations
- Creating and plotting custom gathers from Salvus' receiver outputs
- Equivalence of Filtering STFs and Filtering Synthetics
- External 2D Meshes
- External 3D Meshes
- Full-Waveform Inversion