From f10eeb1ee23a3672ea9007b455bb3f0df88a74cc Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 15 Feb 2025 22:21:03 +0100 Subject: [PATCH 01/24] Use table for conventions --- pygmt/src/meca.py | 54 +++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index ba6de1f7868..5a4c9cafd03 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -223,6 +223,39 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 Full option list at :gmt-docs:`supplements/seis/meca.html` + Different conventions are supported: + + | 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* | + + .. list-table:: + :widths: 30 30 30 + :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* + {aliases} Parameters @@ -250,16 +283,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. A dict may contain values for a single focal mechanism or lists of values for multiple focal mechanisms. @@ -287,14 +312,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. From 2b69b5706fc08435f76997038734395d26417a04 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 15 Feb 2025 22:37:55 +0100 Subject: [PATCH 02/24] Use rst syntax --- pygmt/src/meca.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 5a4c9cafd03..bcbf0e95954 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -225,16 +225,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 Different conventions are supported: - | 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* | - .. list-table:: - :widths: 30 30 30 + :widths: 30 30 30 :header-rows: 1 * - Convention From 35d4104a4e21556266a825e138a2faf6938d0d85 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 15 Feb 2025 22:48:27 +0100 Subject: [PATCH 03/24] Remove italic style --- pygmt/src/meca.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index bcbf0e95954..c08e7a39244 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -234,19 +234,19 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - Focal parameters * - ``"aki"`` - Aki and Richard - - *strike*, *dip*, *rake*, *magnitude* + - strike, dip, rake, magnitude * - ``"gcmt"`` - global CMT - - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, *mantissa*, *exponent* + - strike1, dip1, rake1, strike2, dip2, rake2, mantissa, exponent * - ``"mt"`` - seismic moment tensor - - *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent* + - mrr, mtt, mff, mrt, mrf, mtf, exponent * - ``"partial"`` - partial focal mechanism - - *strike1*, *dip1*, *strike2*, *fault_type*, *magnitude* + - 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* + - t_value, t_azimuth, t_plunge, n_value, n_azimuth, n_plunge, p_value, p_azimuth, p_plunge, exponent {aliases} From ceb1136ada6fb5e8af696b46a06c4a08a838a59a Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Feb 2025 08:55:05 +0100 Subject: [PATCH 04/24] Replace tabs | Remove white spaces --- pygmt/src/meca.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index c08e7a39244..b99eac67ab5 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -233,19 +233,19 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - Description - Focal parameters * - ``"aki"`` - - Aki and Richard + - Aki and Richard - strike, dip, rake, magnitude * - ``"gcmt"`` - - global CMT + - global CMT - strike1, dip1, rake1, strike2, dip2, rake2, mantissa, exponent * - ``"mt"`` - - seismic moment tensor + - seismic moment tensor - mrr, mtt, mff, mrt, mrf, mtf, exponent - * - ``"partial"`` - - partial focal mechanism + * - ``"partial"`` + - partial focal mechanism - strike1, dip1, strike2, fault_type, magnitude - * - ``"principal_axis"`` - - principal axis + * - ``"principal_axis"`` + - principal axis - t_value, t_azimuth, t_plunge, n_value, n_azimuth, n_plunge, p_value, p_azimuth, p_plunge, exponent {aliases} From 0964e1cabf7e0a0b66b20b1076b889e99ec1f60a Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Feb 2025 09:14:24 +0100 Subject: [PATCH 05/24] Add italic style | Try multi-line --- pygmt/src/meca.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index b99eac67ab5..30f40678189 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -221,12 +221,10 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 r""" Plot focal mechanisms. - Full option list at :gmt-docs:`supplements/seis/meca.html` - Different conventions are supported: .. list-table:: - :widths: 30 30 30 + :widths: 15 15 70 :header-rows: 1 * - Convention @@ -234,19 +232,22 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - Focal parameters * - ``"aki"`` - Aki and Richard - - strike, dip, rake, magnitude + - *strike*, *dip*, *rake*, *magnitude* * - ``"gcmt"`` - global CMT - - strike1, dip1, rake1, strike2, dip2, rake2, mantissa, exponent + - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, *mantissa*, *exponent* * - ``"mt"`` - seismic moment tensor - - mrr, mtt, mff, mrt, mrf, mtf, exponent + - *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent* * - ``"partial"`` - partial focal mechanism - - strike1, dip1, strike2, fault_type, magnitude + - *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 + - | *t_value*, *t_azimuth*, *t_plunge*, *n_value*, *n_azimuth*, *n_plunge*, + - | *p_value*, *p_azimuth*, *p_plunge*, *exponent* + + Full option list at :gmt-docs:`supplements/seis/meca.html` {aliases} From dc7198a0fd99c87469f8914f30aae31830cf7d08 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Feb 2025 09:27:44 +0100 Subject: [PATCH 06/24] More multi line --- pygmt/src/meca.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 30f40678189..09a8bd0636a 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -235,7 +235,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - *strike*, *dip*, *rake*, *magnitude* * - ``"gcmt"`` - global CMT - - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, *mantissa*, *exponent* + - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, + *mantissa*, *exponent* * - ``"mt"`` - seismic moment tensor - *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent* @@ -244,8 +245,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - *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* + - *t_value*, *t_azimuth*, *t_plunge*, *n_value*, *n_azimuth*, *n_plunge*, + *p_value*, *p_azimuth*, *p_plunge*, *exponent* Full option list at :gmt-docs:`supplements/seis/meca.html` From 23c96742d733ce89da880f25fce19aef3df24b2e Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Feb 2025 09:37:58 +0100 Subject: [PATCH 07/24] Fix line breaks --- pygmt/src/meca.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 09a8bd0636a..8a2c4caa6d1 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -235,8 +235,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - *strike*, *dip*, *rake*, *magnitude* * - ``"gcmt"`` - global CMT - - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, - *mantissa*, *exponent* + - | *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, + | *mantissa*, *exponent* * - ``"mt"`` - seismic moment tensor - *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent* @@ -245,8 +245,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - *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* + - | *t_value*, *t_azimuth*, *t_plunge*, *n_value*, *n_azimuth*, *n_plunge*, + | *p_value*, *p_azimuth*, *p_plunge*, *exponent* Full option list at :gmt-docs:`supplements/seis/meca.html` From 566592a2eaee322695f7f5c593009ac860ff6114 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Feb 2025 10:05:29 +0100 Subject: [PATCH 08/24] No fixed liine breaks --- pygmt/src/meca.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 8a2c4caa6d1..09a8bd0636a 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -235,8 +235,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - *strike*, *dip*, *rake*, *magnitude* * - ``"gcmt"`` - global CMT - - | *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, - | *mantissa*, *exponent* + - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, + *mantissa*, *exponent* * - ``"mt"`` - seismic moment tensor - *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent* @@ -245,8 +245,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - *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* + - *t_value*, *t_azimuth*, *t_plunge*, *n_value*, *n_azimuth*, *n_plunge*, + *p_value*, *p_azimuth*, *p_plunge*, *exponent* Full option list at :gmt-docs:`supplements/seis/meca.html` From fbe92b35eb0b8692292479f1b9f8f5343a873097 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Feb 2025 11:24:49 +0100 Subject: [PATCH 09/24] Update docs for newly added table --- pygmt/src/meca.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 09a8bd0636a..b178dcce1ab 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -221,7 +221,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 r""" Plot focal mechanisms. - Different conventions are supported: + The following conventions are supported: .. list-table:: :widths: 15 15 70 @@ -234,7 +234,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - Aki and Richard - *strike*, *dip*, *rake*, *magnitude* * - ``"gcmt"`` - - global CMT + - global centroid moment tensor - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, *mantissa*, *exponent* * - ``"mt"`` @@ -265,7 +265,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - Columns 1 and 2: event longitude and latitude - Column 3: event depth (in kilometers) - Columns 4 to 3+n: focal mechanism parameters. The number of columns *n* - depends on the choice of ``convention``, which is described below. + depends on the choice of ``convention`` (see the table above for the + supported conventions). - Columns 4+n and 5+n: longitude and latitude at which to place the beachball. ``0 0`` plots the beachball at the longitude and latitude given in the columns 1 and 2. [optional; requires ``offset=True``]. From 809c45994a8dde430ef4c394dea90cc4b757b4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Sun, 16 Feb 2025 14:25:16 +0100 Subject: [PATCH 10/24] Add title to tabel Co-authored-by: Dongdong Tian --- pygmt/src/meca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index b178dcce1ab..83f576f8dc1 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -223,7 +223,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 The following conventions are supported: - .. list-table:: + .. list-table:: Supported focal mechanism conventions :widths: 15 15 70 :header-rows: 1 From 185674daeffbd9d4bee8ed9c407b603d2a7ba185 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Feb 2025 14:33:04 +0100 Subject: [PATCH 11/24] Update docs --- pygmt/src/meca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 83f576f8dc1..1d6c326f3cb 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -221,7 +221,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 r""" Plot focal mechanisms. - The following conventions are supported: + The following focal mechanism conventions are supported: .. list-table:: Supported focal mechanism conventions :widths: 15 15 70 From a40026261c77177f7f068f5a7ea959f873db2cad Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Mon, 17 Feb 2025 18:21:42 +0100 Subject: [PATCH 12/24] Try table with four columns --- pygmt/src/meca.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 1d6c326f3cb..1918c239a2e 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -224,29 +224,41 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 The following focal mechanism conventions are supported: .. list-table:: Supported focal mechanism conventions - :widths: 15 15 70 + :widths: 15 15 45 25 :header-rows: 1 * - Convention - Description - Focal parameters + - Remark * - ``"aki"`` - Aki and Richard - *strike*, *dip*, *rake*, *magnitude* + - angles in degrees * - ``"gcmt"`` - global centroid moment tensor - - *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*, - *mantissa*, *exponent* + - | *strike1*, *dip1*, *rake1*, + | *strike2*, *dip2*, *rake2*, + | *mantissa*, *exponent* + - angles in degrees * - ``"mt"`` - seismic moment tensor - - *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent* + - | *mrr*, *mtt*, *mff*, + | *mrt*, *mrf*, *mtf*, + | *exponent* + - moment components in dynes-cm * - ``"partial"`` - partial focal mechanism - - *strike1*, *dip1*, *strike2*, *fault_type*, *magnitude* + - | *strike1*, *dip1*, *strike2*, + | *fault_type*, *magnitude* + - | angles in degrees; *fault_type* means + | +1/-1 for normal/reverse fault * - ``"principal_axis"`` - principal axis - - *t_value*, *t_azimuth*, *t_plunge*, *n_value*, *n_azimuth*, *n_plunge*, - *p_value*, *p_azimuth*, *p_plunge*, *exponent* + - | *t_value*, *t_azimuth*, *t_plunge*, + | *n_value*, *n_azimuth*, *n_plunge*, + | *p_value*, *p_azimuth*, *p_plunge*, *exponent* + - angles in degrees Full option list at :gmt-docs:`supplements/seis/meca.html` From d521d277794e391078ebeb8cf076b354562ae1a7 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Mon, 17 Feb 2025 18:32:42 +0100 Subject: [PATCH 13/24] More line breaks --- pygmt/src/meca.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 1918c239a2e..18d2ccabf7b 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -246,18 +246,21 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - | *mrr*, *mtt*, *mff*, | *mrt*, *mrf*, *mtf*, | *exponent* - - moment components in dynes-cm + - | moment components + | in dynes-cm * - ``"partial"`` - partial focal mechanism - | *strike1*, *dip1*, *strike2*, | *fault_type*, *magnitude* - - | angles in degrees; *fault_type* means - | +1/-1 for normal/reverse fault + - | angles in degrees; + | *fault_type* means +1/-1 for + | normal/reverse fault * - ``"principal_axis"`` - principal axis - | *t_value*, *t_azimuth*, *t_plunge*, | *n_value*, *n_azimuth*, *n_plunge*, - | *p_value*, *p_azimuth*, *p_plunge*, *exponent* + | *p_value*, *p_azimuth*, *p_plunge*, + | *exponent* - angles in degrees Full option list at :gmt-docs:`supplements/seis/meca.html` From 436b998b0554a1fe3700cecea5c4e0b6cbda0885 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Mon, 17 Feb 2025 19:01:30 +0100 Subject: [PATCH 14/24] Adjust column width | Add period to caption --- pygmt/src/meca.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 18d2ccabf7b..ed89fe97766 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -223,8 +223,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 The following focal mechanism conventions are supported: - .. list-table:: Supported focal mechanism conventions - :widths: 15 15 45 25 + .. list-table:: Supported focal mechanism conventions. + :widths: 15 15 40 30 :header-rows: 1 * - Convention From 38746e8c8d3b540ee15f58820a91f2c02ac902e0 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 18 Feb 2025 08:25:01 +0100 Subject: [PATCH 15/24] Add more content to table --- pygmt/src/meca.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index ed89fe97766..c80c7c36275 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -240,7 +240,9 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - | *strike1*, *dip1*, *rake1*, | *strike2*, *dip2*, *rake2*, | *mantissa*, *exponent* - - angles in degrees + - | angles in degrees; + | *mantissa*, *exponent*are for + | seismic moment in dyne-cm * - ``"mt"`` - seismic moment tensor - | *mrr*, *mtt*, *mff*, @@ -261,7 +263,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *n_value*, *n_azimuth*, *n_plunge*, | *p_value*, *p_azimuth*, *p_plunge*, | *exponent* - - angles in degrees + - values in dyne-cm Full option list at :gmt-docs:`supplements/seis/meca.html` From 96442b2dff14b715ce7f0922f3ab4c76140a9ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Tue, 18 Feb 2025 09:48:25 +0100 Subject: [PATCH 16/24] Fix typo Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> --- pygmt/src/meca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index c80c7c36275..96b15a401ad 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -296,7 +296,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - *dict* or :class:`pandas.DataFrame`: The dict keys or :class:`pandas.DataFrame` column names determine the focal mechanism convention. For the different conventions, the combination of keys / - column names as given in the tabel above are required. + column names as given in the table above are required. A dict may contain values for a single focal mechanism or lists of values for multiple focal mechanisms. From 09f5fe32918c07c8e39bc228ffb8b93a8ca28b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Tue, 18 Feb 2025 09:51:55 +0100 Subject: [PATCH 17/24] Use math mode Co-authored-by: Dongdong Tian --- pygmt/src/meca.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 96b15a401ad..0c49a05d8c1 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -241,15 +241,15 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *strike2*, *dip2*, *rake2*, | *mantissa*, *exponent* - | angles in degrees; - | *mantissa*, *exponent*are for - | seismic moment in dyne-cm + | seismic moment is :math:`mantissa * 10 ^ {exponent}` + | in dyne-cm * - ``"mt"`` - seismic moment tensor - | *mrr*, *mtt*, *mff*, | *mrt*, *mrf*, *mtf*, | *exponent* - - | moment components - | in dynes-cm + - | moment components + | in :math:`10*{exponent}` dyne-cm * - ``"partial"`` - partial focal mechanism - | *strike1*, *dip1*, *strike2*, @@ -263,7 +263,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *n_value*, *n_azimuth*, *n_plunge*, | *p_value*, *p_azimuth*, *p_plunge*, | *exponent* - - values in dyne-cm + - | values in :math:`10*{exponent}` dyne-cm; + | azimuth and plunge in degrees Full option list at :gmt-docs:`supplements/seis/meca.html` From 35380b94ea7a9eff0ea5f1a332bda06ffb136321 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 18 Feb 2025 10:03:51 +0100 Subject: [PATCH 18/24] Fix dyn-cm unit --- pygmt/src/meca.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 0c49a05d8c1..5f96833c6d6 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -242,14 +242,14 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *mantissa*, *exponent* - | angles in degrees; | seismic moment is :math:`mantissa * 10 ^ {exponent}` - | in dyne-cm + | in dyn-cm * - ``"mt"`` - seismic moment tensor - | *mrr*, *mtt*, *mff*, | *mrt*, *mrf*, *mtf*, | *exponent* - | moment components - | in :math:`10*{exponent}` dyne-cm + | in :math:`10*{exponent}` dyn-cm * - ``"partial"`` - partial focal mechanism - | *strike1*, *dip1*, *strike2*, @@ -263,7 +263,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *n_value*, *n_azimuth*, *n_plunge*, | *p_value*, *p_azimuth*, *p_plunge*, | *exponent* - - | values in :math:`10*{exponent}` dyne-cm; + - | values in :math:`10*{exponent}` dyn-cm; | azimuth and plunge in degrees Full option list at :gmt-docs:`supplements/seis/meca.html` @@ -315,7 +315,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 [**+l**][**+m**][**+o**\ *dx*\ [/\ *dy*]][**+s**\ *reference*]. Adjust scaling of the radius of the beachball, which is proportional to the magnitude. By default, *scale* defines the size for magnitude = 5 (i.e., scalar - seismic moment M0 = 4.0E23 dynes-cm). If **+l** is used the radius will be + seismic moment M0 = 4.0E23 dyn-cm). If **+l** is used the radius will be proportional to the seismic moment instead. Use **+s** and give a *reference* to change the reference magnitude (or moment), and use **+m** to plot all beachballs with the same size. A text string can be specified to appear near From d930b9e95bdfa785306caf66e0ef952ca1b10b80 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 18 Feb 2025 10:07:00 +0100 Subject: [PATCH 19/24] Fix formular --- pygmt/src/meca.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 5f96833c6d6..7ef797036cb 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -249,7 +249,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *mrt*, *mrf*, *mtf*, | *exponent* - | moment components - | in :math:`10*{exponent}` dyn-cm + | in :math:`10 ^ {exponent}` dyn-cm * - ``"partial"`` - partial focal mechanism - | *strike1*, *dip1*, *strike2*, @@ -263,7 +263,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *n_value*, *n_azimuth*, *n_plunge*, | *p_value*, *p_azimuth*, *p_plunge*, | *exponent* - - | values in :math:`10*{exponent}` dyn-cm; + - | values in :math:`10 ^ {exponent}` dyn-cm; | azimuth and plunge in degrees Full option list at :gmt-docs:`supplements/seis/meca.html` From 4611e1254377ef6e954f496c412f8d7421981542 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 18 Feb 2025 10:07:26 +0100 Subject: [PATCH 20/24] Remove trailing white spaces --- pygmt/src/meca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 7ef797036cb..6db96516291 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -248,7 +248,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 - | *mrr*, *mtt*, *mff*, | *mrt*, *mrf*, *mtf*, | *exponent* - - | moment components + - | moment components | in :math:`10 ^ {exponent}` dyn-cm * - ``"partial"`` - partial focal mechanism From 409f5b2cec8702dacf7244d897a9c361a3db6d49 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 18 Feb 2025 11:18:09 +0100 Subject: [PATCH 21/24] Remove hypen --- pygmt/src/meca.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 6db96516291..a2adfb8f45f 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -242,14 +242,14 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *mantissa*, *exponent* - | angles in degrees; | seismic moment is :math:`mantissa * 10 ^ {exponent}` - | in dyn-cm + | in dyn cm * - ``"mt"`` - seismic moment tensor - | *mrr*, *mtt*, *mff*, | *mrt*, *mrf*, *mtf*, | *exponent* - | moment components - | in :math:`10 ^ {exponent}` dyn-cm + | in :math:`10 ^ {exponent}` dyn cm * - ``"partial"`` - partial focal mechanism - | *strike1*, *dip1*, *strike2*, @@ -263,7 +263,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *n_value*, *n_azimuth*, *n_plunge*, | *p_value*, *p_azimuth*, *p_plunge*, | *exponent* - - | values in :math:`10 ^ {exponent}` dyn-cm; + - | values in :math:`10 ^ {exponent}` dyn cm; | azimuth and plunge in degrees Full option list at :gmt-docs:`supplements/seis/meca.html` @@ -315,7 +315,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 [**+l**][**+m**][**+o**\ *dx*\ [/\ *dy*]][**+s**\ *reference*]. Adjust scaling of the radius of the beachball, which is proportional to the magnitude. By default, *scale* defines the size for magnitude = 5 (i.e., scalar - seismic moment M0 = 4.0E23 dyn-cm). If **+l** is used the radius will be + seismic moment M0 = 4.0E23 dyn cm). If **+l** is used the radius will be proportional to the seismic moment instead. Use **+s** and give a *reference* to change the reference magnitude (or moment), and use **+m** to plot all beachballs with the same size. A text string can be specified to appear near From aa53f4abf8d37f0606e3054fbd8348aabda8e8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Tue, 18 Feb 2025 11:28:35 +0100 Subject: [PATCH 22/24] Escape curly braces Co-authored-by: Dongdong Tian --- pygmt/src/meca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index a2adfb8f45f..5c1daad032d 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -241,7 +241,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *strike2*, *dip2*, *rake2*, | *mantissa*, *exponent* - | angles in degrees; - | seismic moment is :math:`mantissa * 10 ^ {exponent}` + | seismic moment is :math:`mantissa * 10 ^ {{exponent}}` | in dyn cm * - ``"mt"`` - seismic moment tensor From 72036a89ed837f9b465acc0f388e0e5bc682ed6d Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 18 Feb 2025 11:30:25 +0100 Subject: [PATCH 23/24] Escape curvely brackets --- pygmt/src/meca.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 5c1daad032d..57fb9a20be8 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -249,7 +249,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *mrt*, *mrf*, *mtf*, | *exponent* - | moment components - | in :math:`10 ^ {exponent}` dyn cm + | in :math:`10 ^ {{exponent}}` dyn cm * - ``"partial"`` - partial focal mechanism - | *strike1*, *dip1*, *strike2*, @@ -263,7 +263,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *n_value*, *n_azimuth*, *n_plunge*, | *p_value*, *p_azimuth*, *p_plunge*, | *exponent* - - | values in :math:`10 ^ {exponent}` dyn cm; + - | values in :math:`10 ^ {{exponent}}` dyn cm; | azimuth and plunge in degrees Full option list at :gmt-docs:`supplements/seis/meca.html` From 4a1d11bbe74ee8acd5b8ceb5745763eb0f7a14f1 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 18 Feb 2025 11:47:39 +0100 Subject: [PATCH 24/24] More line breaks --- pygmt/src/meca.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 57fb9a20be8..e17cdceb4fd 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -241,7 +241,8 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *strike2*, *dip2*, *rake2*, | *mantissa*, *exponent* - | angles in degrees; - | seismic moment is :math:`mantissa * 10 ^ {{exponent}}` + | seismic moment is + | :math:`mantissa * 10 ^ {{exponent}}` | in dyn cm * - ``"mt"`` - seismic moment tensor @@ -264,7 +265,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915 | *p_value*, *p_azimuth*, *p_plunge*, | *exponent* - | values in :math:`10 ^ {{exponent}}` dyn cm; - | azimuth and plunge in degrees + | azimuths and plunges in degrees Full option list at :gmt-docs:`supplements/seis/meca.html`