Version:

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()

Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
SIGNATURE
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: ...
ARGUMENTS
Required
project
Type:Project
Description:
Project.
Required
simulation_configuration
Type:str
Description:
Name of the simulation configuration.
Required
misfit_configuration
Type:str
Description:
Misfit configuration.
Required
wavefield_compression
Type:WavefieldCompression
Description:
Wavefield compression settings.
Optional
events
Type:str | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None
Default value:None
Description:
List of events to plot (optional).
Optional
html
Type:bool
Default value:True
Description:
Return html or widget.
RETURNS
Return type: ipywidgets.VBox | None

get_inversion_widget()

Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
SIGNATURE
def get_inversion_widget(
    project: Project, inverse_problem_configuration: str, html: bool = True
) -> ipywidgets.VBox | None: ...
ARGUMENTS
Required
project
Type:Project
Description:
Project.
Required
inverse_problem_configuration
Type:str
Description:
Name of the inverse problem.
Optional
html
Type:bool
Default value:True
Description:
Return html or widget.
RETURNS
Return type: ipywidgets.VBox | None

get_iteration_widget()

Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
SIGNATURE
def get_iteration_widget(
    project: Project,
    inverse_problem_configuration: str,
    iteration_id: int,
    html: bool = True,
) -> ipywidgets.VBox | None: ...
ARGUMENTS
Required
project
Type:Project
Description:
Project.
Required
inverse_problem_configuration
Type:str
Description:
Name of the inverse problem.
Required
iteration_id
Type:int
Description:
Iteration id.
Optional
html
Type:bool
Default value:True
Description:
Return html or widget.
RETURNS
Return type: ipywidgets.VBox | None

get_iterations_widget()

Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
SIGNATURE
def get_iterations_widget(
    project: Project,
    inverse_problem_configuration: str,
    iteration_ids: typing.Sequence[int] | None = None,
    html: bool = True,
) -> ipywidgets.VBox | None: ...
ARGUMENTS
Required
project
Type:Project
Description:
Project.
Required
inverse_problem_configuration
Type:str
Description:
Name of the inverse problem configuration.
Optional
iteration_ids
Type:typing.Sequence[int] | None
Default value:None
Description:
Optional list of iteration IDs.
Optional
html
Type:bool
Default value:True
Description:
Return html or widget.
RETURNS
Return type: ipywidgets.VBox | None

Classes

NotebookVisualizationComponent

Jupyter notebook specific visualizations.
SIGNATURE
class NotebookVisualizationComponent(builtins.object):
    def __init__(self, project: Project): ...
ARGUMENTS
Required
project
Type:Project
Description:
The project to attach the component to.

Methods

NotebookVisualizationComponent.domain()
Visualize the domain including all events.
SIGNATURE
def domain(self) -> Domain: ...
NotebookVisualizationComponent.gradients()
Launch a notebook visualization of structural gradients.
Plots the event-dependent gradient on the mesh, as well as the sources and receivers
SIGNATURE
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: ...
ARGUMENTS
Required
simulation_configuration
Type:str
Description:
Name of the simulation configuration.
Required
misfit_configuration
Type:str
Description:
Misfit configuration.
Optional
wavefield_compression
Type:WavefieldCompression | None
Default value:None
Description:
The wavefield compression settings.
Optional
events
Type:str | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None
Default value:None
Description:
List of events to plot (optional).
NotebookVisualizationComponent.inversion()
Launch a notebook visualization of an inversion.
Plots and displays info about models, misfits, and more.
SIGNATURE
def inversion(self, inverse_problem_configuration: str) -> None: ...
ARGUMENTS
Required
inverse_problem_configuration
Type:str
Description:
Name of the inverse problem.
NotebookVisualizationComponent.iteration()
Launch a notebook visualization of an iteration.
Plots all models associated with the iteration
SIGNATURE
def iteration(
    self, inverse_problem_configuration: str, iteration_id: int
) -> None: ...
ARGUMENTS
Required
inverse_problem_configuration
Type:str
Description:
Name of the inverse problem.
Required
iteration_id
Type:int
Description:
Iteration id.
NotebookVisualizationComponent.misfit_comparison()
Show a misfit comparison table comparing the misfit for one set of synthetics to one or more others.
SIGNATURE
def misfit_comparison(
    self,
    reference_data: str,
    other_data: list[str] | None = None,
    misfit_configuration: str,
    event: str | Event,
) -> typing.Any: ...
ARGUMENTS
Required
reference_data
Type:str
Description:
The synthetics for the baseline misfit.
Optional
other_data
Type:list[str] | None
Default value:None
Description:
One or more other misfits to be compared against the baseline. If not given it will just show the misfits for the reference data.
Required
misfit_configuration
Type:str
Description:
The misfit configuration.
Required
event
Type:str | Event
Description:
The event to do it for.
NotebookVisualizationComponent.misfits()
Visualize misfits in a jupyter notebook.
SIGNATURE
def misfits(
    self,
    simulation_configuration: str,
    misfit_configuration: str,
    events: (
        str
        | typing.Sequence[str]
        | Event
        | typing.Sequence[Event]
        | EventCollection
        | None
    ) = None,
) -> None: ...
ARGUMENTS
Required
simulation_configuration
Type:str
Description:
The simulation configuration to visualize.
Required
misfit_configuration
Type:str
Description:
The misfit configuration to visualize.
Optional
events
Type:str | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None
Default value:None
Description:
events to include in the widget. If None, all events in the project are included.
NotebookVisualizationComponent.simulation_setup()
Launch a notebook visualization of a simulation configuration.
Plots the mesh, as well as the sources and receivers
SIGNATURE
def simulation_setup(
    self,
    simulation_configuration: str,
    events: (
        str
        | typing.Sequence[str]
        | Event
        | typing.Sequence[Event]
        | EventCollection
        | None
    ) = None,
) -> simple_config.simulation.Waveform | UnstructuredMesh: ...
ARGUMENTS
Required
simulation_configuration
Type:str
Description:
Name of the simulation configuration.
Optional
events
Type:str | typing.Sequence[str] | Event | typing.Sequence[Event] | EventCollection | None
Default value:None
Description:
List of events to plot.
NotebookVisualizationComponent.waveforms()
Waveform data comparison in the notebooks.
SIGNATURE
def waveforms(
    self,
    data: list[str] | str,
    receiver_field: str,
    data_selection_configuration: str | None = None,
) -> None: ...
ARGUMENTS
Required
data
Type:list[str] | str
Description:
List of data names to visualize. Allows piping data through processing functionality, e.g. "data_name|normalize".
Required
receiver_field
Type:str
Description:
The receiver field to use.
Optional
data_selection_configuration
Type:str | None
Default value:None
Description:
Name of the data selection configuration to apply/visualize.
PAGE CONTENTS