Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ratio curve plots #429

Merged
merged 22 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
54a6690
colour improvements
CB-quakemodel Sep 14, 2024
d3d0dbd
cleaning before adding new function
CB-quakemodel Sep 15, 2024
a51c9ce
update
CB-quakemodel Sep 15, 2024
64b1b1f
update
CB-quakemodel Sep 15, 2024
5ff2b37
refactor existing function
CB-quakemodel Sep 15, 2024
6b7439e
refactor
CB-quakemodel Sep 15, 2024
de1d843
update
CB-quakemodel Sep 15, 2024
7c8d8fc
adding baseline GMM specification to config object
CB-quakemodel Sep 15, 2024
ae14145
adding baseline GMM specification to config object
CB-quakemodel Sep 15, 2024
394f30f
adding baseline GMM specification to config object
CB-quakemodel Sep 15, 2024
6527a93
update
CB-quakemodel Sep 16, 2024
39cfdaa
adding ratio plotting functions + updating demos
CB-quakemodel Sep 16, 2024
5f281ee
adding unit tests
CB-quakemodel Sep 16, 2024
5019d43
updating documenation
CB-quakemodel Sep 16, 2024
556dea7
adding mgmpe test for loading baseline model
CB-quakemodel Sep 16, 2024
1031c88
doc fix
CB-quakemodel Sep 16, 2024
60ab38a
Merge branch 'master' of https://github.com/GEMScienceTools/oq-mbtk i…
CB-quakemodel Sep 17, 2024
c6690f9
Merge branch 'master' of https://github.com/GEMScienceTools/oq-mbtk i…
CB-quakemodel Sep 30, 2024
6ed1262
Merge branch 'master' of https://github.com/GEMScienceTools/oq-mbtk i…
CB-quakemodel Sep 30, 2024
565a138
Merge branch 'master' of https://github.com/GEMScienceTools/oq-mbtk i…
CB-quakemodel Oct 7, 2024
2842263
Merge branch 'master' of https://github.com/GEMScienceTools/oq-mbtk i…
CB-quakemodel Oct 8, 2024
a4fc792
Merge branch 'master' of https://github.com/GEMScienceTools/oq-mbtk i…
CB-quakemodel Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions docsrc/contents/smt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,13 @@ Comparing GMPEs
[models.AkkarEtAlRjb2014]
lt_weight_gmc2_plot_lt_only = 0.50

# Also specify a GMM to compute ratios of the attenuation against (GMM/baseline)
[ratios_baseline_gmm.BooreEtAl2020]

[custom_colors]
custom_colors_flag = 'False' # Set to "True" for custom colours in plots
custom_colors_list = ['lime', 'dodgerblue', 'gold', '0.8']


3. Trellis Plots

Now that we have defined our inputs for GMPE comparison, we can use each tool within the Comparison module to evaluate how similar the GMPEs predict ground-motion for a given ground-shaking scenario.
Expand Down Expand Up @@ -573,10 +575,21 @@ Comparing GMPEs
> comp.plot_spectra(filename, output_directory, obs_spectra='spectra_chamoli_1991_station_UKHI.csv')

Response spectra plots for input parameters specified in toml file:
.. image:: /contents/smt_images/ObsSpectra.png

.. image:: /contents/smt_images/ObsSpectra.png

6. Plot of ratios of attenuation curves

The ratios of the median predictions from each GMM and a baseline GMM (specified in the ``.toml`` - see above) can also be plotted. An example is provided in the demo files:

.. code-block:: ini

> # Plot ratios of median attenuation curves for each GMM/median attenuation curves for baseline GMM
> comp.plot_ratios(filename, output_directory)

Ratio plots for input parameters specified in toml file (note that here the baseline GMM is BooreEtAl2014):
.. image:: /contents/smt_images/RatioPlots.png

6. Sammon's Maps
7. Sammon's Maps

We can plot Sammon's Maps to examine how similar the medians (and 16th and 84th percentiles) of predicted ground-motion of each GMPE are (see Sammon, 1969 and Scherbaum et al. 2010 for more details on the Sammon's mapping procedure).

Expand All @@ -592,7 +605,7 @@ Comparing GMPEs
Sammon's Maps (median predicted ground-motion) for input parameters specified in toml file:
.. image:: /contents/smt_images/Median_SammonMaps.png

7. Hierarchical Clustering
8. Hierarchical Clustering

Dendrograms can be plotted as an alternative tool to evaluate how similarly the predicted ground-motion is by each GMPE.

Expand All @@ -608,7 +621,7 @@ Comparing GMPEs
Dendrograms (median predicted ground-motion) for input parameters specified in toml file:
.. image:: /contents/smt_images/Median_Clustering.png

8. Matrix Plots of Euclidean Distance
9. Matrix Plots of Euclidean Distance

In addition to Sammon's Maps and hierarchical clustering, we can also plot the Euclidean distance between the predicted ground-motions by each GMPE in a matrix plot.

Expand All @@ -624,7 +637,7 @@ Comparing GMPEs
Matrix plots of Euclidean distance between GMPEs (median predicted ground-motion) for input parameters specified in toml file:
.. image:: /contents/smt_images/Median_Euclidean.png

9. Using ModifiableGMPE to modify GMPEs within a ``.toml``.
10. Using ModifiableGMPE to modify GMPEs within a ``.toml``.

In addition to specifying predefined arguments for each GMPE, the user can also modify GMPEs using ModifiableGMPE (found in ``oq-engine.openquake.hazardlib.gsim.mgmpe.modifiable_gmpe``).

Expand Down
Binary file added docsrc/contents/smt_images/RatioPlots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading