Skip to content

Commit

Permalink
Figure.meca: Fix typo pricipal_axis -> principal_axis (#2940)
Browse files Browse the repository at this point in the history
Fixes error like `GMTInvalidInput: Invalid convention 'pricipal_axis'` from being raised.
  • Loading branch information
weiji14 committed Jan 2, 2024
1 parent da36673 commit 5639f24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygmt/src/meca.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def convention_params(convention):
],
"mt": ["mrr", "mtt", "mff", "mrt", "mrf", "mtf", "exponent"],
"partial": ["strike1", "dip1", "strike2", "fault_type", "magnitude"],
"pricipal_axis": [
"principal_axis": [
"t_value",
"t_azimuth",
"t_plunge",
Expand Down Expand Up @@ -401,7 +401,7 @@ def meca( # noqa: PLR0912, PLR0913, PLR0915
# Convert spec to pandas.DataFrame unless it's a file
if isinstance(spec, (dict, pd.DataFrame)): # spec is a dict or pd.DataFrame
# determine convention from dict keys or pd.DataFrame column names
for conv in ["aki", "gcmt", "mt", "partial", "pricipal_axis"]:
for conv in ["aki", "gcmt", "mt", "partial", "principal_axis"]:
if set(convention_params(conv)).issubset(set(spec.keys())):
convention = conv
break
Expand Down

0 comments on commit 5639f24

Please sign in to comment.