Skip to content
Merged
Changes from 8 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
48 changes: 30 additions & 18 deletions pygmt/src/meca.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,33 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915
r"""
Plot focal mechanisms.

Different conventions are supported:
Comment thread
yvonnefroehlich marked this conversation as resolved.
Outdated

.. list-table::
Comment thread
yvonnefroehlich marked this conversation as resolved.
Outdated
:widths: 15 15 70
:header-rows: 1

* - Convention
- Description
- Focal parameters
* - ``"aki"``
- Aki and Richard
- *strike*, *dip*, *rake*, *magnitude*
* - ``"gcmt"``
- global CMT
- *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*,
*mantissa*, *exponent*
* - ``"mt"``
- seismic moment tensor
- *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent*
* - ``"partial"``
- partial focal mechanism
- *strike1*, *dip1*, *strike2*, *fault_type*, *magnitude*
* - ``"principal_axis"``
- principal axis
- *t_value*, *t_azimuth*, *t_plunge*, *n_value*, *n_azimuth*, *n_plunge*,
*p_value*, *p_azimuth*, *p_plunge*, *exponent*
Comment thread
seisman marked this conversation as resolved.
Outdated

Full option list at :gmt-docs:`supplements/seis/meca.html`

{aliases}
Expand Down Expand Up @@ -250,16 +277,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915
The meanings of columns are the same as above.
- *dict* or :class:`pandas.DataFrame`: The dict keys or
:class:`pandas.DataFrame` column names determine the focal mechanism
convention. For the different conventions, the following combination of
keys / column names are required:

- ``"aki"``: *strike*, *dip*, *rake*, *magnitude*
- ``"gcmt"``: *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*,
*mantissa*, *exponent*
- ``"mt"``: *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent*
- ``"partial"``: *strike1*, *dip1*, *strike2*, *fault_type*, *magnitude*
- ``"principal_axis"``: *t_value*, *t_azimuth*, *t_plunge*, *n_value*,
*n_azimuth*, *n_plunge*, *p_value*, *p_azimuth*, *p_plunge*, *exponent*
convention. For the different conventions, the combination of keys /
column names as given in the tabel above are required.
Comment thread
yvonnefroehlich marked this conversation as resolved.
Outdated

A dict may contain values for a single focal mechanism or lists of
values for multiple focal mechanisms.
Expand Down Expand Up @@ -287,14 +306,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915
the text location relative to the beachball [Default is ``"TC"``, i.e., Top
Center]; append **+o** to offset the text string by *dx*\ /*dy*.
convention : str
Focal mechanism convention. Choose from:

- ``"aki"`` (Aki and Richards)
- ``"gcmt"`` (global CMT)
- ``"mt"`` (seismic moment tensor)
- ``"partial"`` (partial focal mechanism)
- ``"principal_axis"`` (principal axis)

Focal mechanism convention. See the table above for the supported conventions.
Ignored if ``spec`` is a dict or :class:`pandas.DataFrame`.
component : str
The component of the seismic moment tensor to plot.
Expand Down