Skip to content

Commit

Permalink
Added example for modified_gsim
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Sep 28, 2024
1 parent 205ed96 commit dfabc5e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/user-guide/inputs/ground-motion-models-inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,21 @@ Here *set_between_epsilon* is simply shifting the mean with the formula *mean ->
the future ``ModifiableGMPE`` will likely grow more methods. If you want to understand how it works you should look at
the source code: `gem/oq-engine <https://github.com/gem/oq-engine/blob/master/openquake/hazardlib/gsim/mgmpe/modifiable_gmpe.py>`_

In engine 3.21 we added a helper function `valid.modified_gsim`
to modify a GMPE. Internally it is creating a `ModifiableGMPE` instance,
but it is much simpler to use. An example is:

.. python:
>>> from openquake.hazardlib import valid
>>> orig_gsim = valid.gsim('Lin2011foot')
>>> gsim = valid.modified_gsim(
... orig_gsim, add_between_within_stds={'with_betw_ratio':1.5})
>>> print(gsim)
[ModifiableGMPE.gmpe.Lin2011foot]
[ModifiableGMPE.add_between_within_stds]
with_betw_ratio = 1.5
***************
NRCan15SiteTerm
***************
Expand Down

0 comments on commit dfabc5e

Please sign in to comment.