salvus.project.components.visualization.notebook_visualization_component
Functions
get_gradients_widget()
get_gradients_widget()def get_gradients_widget(
project: salvus.project.project.Project,
simulation_configuration: str,
misfit_configuration: str,
wavefield_compression: salvus.flow.collections.wavefield_compression.WavefieldCompression,
events: Optional[
str,
Sequence[str],
salvus.flow.collections.event.Event,
Sequence[salvus.flow.collections.event.Event],
salvus.flow.collections.event_collection.EventCollection,
] = None,
html: bool = True,
) -> Optional[ipywidgets.VBox]:
...Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
projectsalvus.project.project.Project — Project.simulation_configurationstr — Name of the simulation configuration.misfit_configurationstr — Misfit configuration.wavefield_compressionsalvus.flow.collections.wavefield_compression.WavefieldCompression — Wavefield compression settings.eventsOptional[str, Sequence[str], salvus.flow.collections.event.Event, Sequence[salvus.flow.collections.event.Event], salvus.flow.collections.event_collection.EventCollection] — List of events to plot (optional).htmlbool — Return html or widget.
get_inversion_widget()
get_inversion_widget()def get_inversion_widget(
project: salvus.project.project.Project,
inverse_problem_configuration: str,
html: bool = True,
) -> Optional[ipywidgets.VBox]:
...Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
projectsalvus.project.project.Project — 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: salvus.project.project.Project,
inverse_problem_configuration: str,
iteration_id: int,
html: bool = True,
) -> Optional[ipywidgets.VBox]:
...Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
projectsalvus.project.project.Project — 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: salvus.project.project.Project,
inverse_problem_configuration: str,
iteration_ids: Optional[Sequence[int]] = None,
html: bool = True,
) -> Optional[ipywidgets.VBox]:
...Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
projectsalvus.project.project.Project — Project.inverse_problem_configurationstr — Name of the inverse problem configuration.iteration_idsOptional[Sequence[int]] — Optional list of iteration IDs.htmlbool — Return html or widget.
Classes
NotebookVisualizationComponent
NotebookVisualizationComponentclass NotebookVisualizationComponent(builtins.object):
def __init__(self, project: salvus.project.project.Project):
...Jupyter notebook specific visualizations.
projectsalvus.project.project.Project — The project to attach the component to.
domain()
domain()def domain(self) -> salvus.project.domain.Domain:
...Visualize the domain including all events.
gradients()
gradients()def gradients(
self,
simulation_configuration: str,
misfit_configuration: str,
wavefield_compression: Optional[
salvus.flow.collections.wavefield_compression.WavefieldCompression
] = None,
events: Optional[
str,
Sequence[str],
salvus.flow.collections.event.Event,
Sequence[salvus.flow.collections.event.Event],
salvus.flow.collections.event_collection.EventCollection,
] = 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_compressionOptional[salvus.flow.collections.wavefield_compression.WavefieldCompression] — The wavefield compression settings.eventsOptional[str, Sequence[str], salvus.flow.collections.event.Event, Sequence[salvus.flow.collections.event.Event], salvus.flow.collections.event_collection.EventCollection] — 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: Optional[List[str]] = None,
misfit_configuration: str,
event: Union[str, salvus.flow.collections.event.Event],
) -> 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_dataOptional[List[str]] — 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.eventUnion[str, salvus.flow.collections.event.Event] — The event to do it for.
misfits()
misfits()def misfits(
self, simulation_configuration: str, misfit_configuration: str
) -> None:
...Visualize misfits in a jupyter notebook.
simulation_configurationstr — The simulation configuration to visualize.misfit_configurationstr — The misfit configuration to visualize.
simulation_setup()
simulation_setup()def simulation_setup(
self,
simulation_configuration: str,
events: Optional[
str,
Sequence[str],
salvus.flow.collections.event.Event,
Sequence[salvus.flow.collections.event.Event],
salvus.flow.collections.event_collection.EventCollection,
] = None,
) -> Union[
salvus.flow.simple_config.simulation.waveform.Waveform,
salvus.mesh.unstructured_mesh.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.eventsOptional[str, Sequence[str], salvus.flow.collections.event.Event, Sequence[salvus.flow.collections.event.Event], salvus.flow.collections.event_collection.EventCollection] — List of events to plot.
waveforms()
waveforms()def waveforms(
self,
data: Union[List[str], str],
receiver_field: str,
data_selection_configuration: Optional[str] = None,
) -> None:
...Waveform data comparison in the notebooks.
dataUnion[List[str], str] — List of data names to visualize.receiver_fieldstr — The receiver field to use.data_selection_configurationOptional[str] — Name of the data selection configuration to apply/visualize.