salvus.project.components.visualization.seismology_visualization_component
Seismology specific visualizations.
Functions
get_windows_widget()
get_windows_widget()def get_windows_widget(
project: salvus.project.project.Project,
data_selection_configuration: str,
html: bool = True,
) -> Optional[ipywidgets.VBox]:
...Launch a window visualization widget.
Parameters
projectsalvus.project.project.Project — Project.data_selection_configurationstr — Name the data selection configuration whose windows to plot.htmlbool — Return html or widget.
Returns Optional[ipywidgets.VBox]
Classes
SeismologyVisualizationComponent
SeismologyVisualizationComponentclass SeismologyVisualizationComponent(builtins.object):
def __init__(self, project: salvus.project.project.Project):
...Seismology specific visualizations.
Parameters
projectsalvus.project.project.Project — The project to attach the component to.
Methods
get_window_statistics_plot()
get_window_statistics_plot()def get_window_statistics_plot(
self,
event: Union[salvus.flow.collections.event.Event, str],
data_selection_configuration: str,
number_of_epicentral_distance_bins: int = 250,
number_of_azimuth_bins: int = 36,
_event_window_and_weight_set: Optional[
salvus.flow.collections.event_window_and_weight_set.EventWindowAndWeightSet
] = None,
) -> None:
...Helper function to visualize picked windows vs epicentral distance for a given event along with some more statistical information.
The goal is to create a single graphic that can be used to judge the quality of picked windows in a statistical way.
Parameters
eventUnion[salvus.flow.collections.event.Event, str] — The event.data_selection_configurationstr — Name of the data selection configuration which contains the windows.number_of_epicentral_distance_binsint — Number of bins along the epicentral distance.number_of_azimuth_binsint — Number of bins in azimuth._event_window_and_weight_setOptional[salvus.flow.collections.event_window_and_weight_set.EventWindowAndWeightSet] — Optional event window and weight set file. Must correspond to the data_selection_configuration. Useful when optimizing some functions and the actual object is already in memory.
Returns None
misfit_map()
misfit_map()def misfit_map(
self,
reference_data: str,
compare_data: Optional[str] = None,
scale_to: Optional[str] = None,
misfit_configuration: str,
basemap: xyzservices.lib.TileProvider = {
"name": "Mondaic ESRI World Light Gray Base",
"url": "https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}?token={accessToken}",
"variant": "Canvas/World_Light_Gray_Base",
"accessToken": "AAPK6a9a2d8f5bc5490a97af53b5cff5ec713vcVh1KJ8B7iueQebJq8YJX6wgj-pKlSbD15dL5TIcYbBIdd6AVKurU_rHlSlmWw",
"html_attribution": "Tiles © Esri — Esri, DeLorme, NAVTEQ",
"attribution": "Tiles (C) Esri -- Esri, DeLorme, NAVTEQ",
"max_zoom": 16,
},
) -> None:
...Interactive widget to visualize misfits or misfit differences on a map.
Parameters
reference_datastr — Simulation configuration for the reference misfit. If no comparison data is chosen it will plot the absolute misfit values of this simulation configuration. Otherwise it will plot the difference between this and the comparison misfit.compare_dataOptional[str] — If given plot the difference between the reference data simulation configuration and this simulation configuration.scale_toOptional[str] — Only allowed ifcompare_datais not given. Absolute misfits by default will be scaled with respect to the largest available misfit. Optionally set this to a simulation configuration that the misfits will be scaled to. Useful to compare absolute misfits across different simulation configurations.misfit_configurationstr — The misfit configuration to use.basemapxyzservices.lib.TileProvider — Choose the ipyleaflet basemap for the plot.
Returns None
receiver_weights_map()
receiver_weights_map()def receiver_weights_map(
self,
data_selection_configuration: str,
basemap: xyzservices.lib.TileProvider = {
"name": "Mondaic ESRI World Light Gray Base",
"url": "https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}?token={accessToken}",
"variant": "Canvas/World_Light_Gray_Base",
"accessToken": "AAPK6a9a2d8f5bc5490a97af53b5cff5ec713vcVh1KJ8B7iueQebJq8YJX6wgj-pKlSbD15dL5TIcYbBIdd6AVKurU_rHlSlmWw",
"html_attribution": "Tiles © Esri — Esri, DeLorme, NAVTEQ",
"attribution": "Tiles (C) Esri -- Esri, DeLorme, NAVTEQ",
"max_zoom": 16,
},
) -> None:
...Interactive widget to visualize receiver weights on a map.
Parameters
data_selection_configurationstr — The name of the data selection configuration.basemapxyzservices.lib.TileProvider — Choose the ipyleaflet basemap for the plot.
Returns None
windows()
windows()def windows(self, data_selection_configuration: str) -> None:
...Launch an interactive notebook visualization utility to analyse picked windows.
Parameters
data_selection_configurationstr — Name of the window set.
Returns None