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

meca: inaccurate and confusing parameter names for "PRINCIPAL_AXIS" convention #1612

Closed
seisman opened this issue Nov 7, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@seisman
Copy link
Member

seisman commented Nov 7, 2021

Description of the problem

The "PRICIPAL_AXIS" convention has 10 parameters: the value (in 10*exponent dynes-cm), azimuth, and plunge of N, T, and P axis, and also the exponent of the values. See https://docs.generic-mapping-tools.org/latest/supplements/seis/meca.html#s for the official documentation. Currently, the meca function defines the following parameters:

pygmt/pygmt/src/meca.py

Lines 255 to 266 in 4b80f3c

"PRINCIPAL_AXIS": [
"t_exponent",
"t_azimuth",
"t_plunge",
"n_exponent",
"n_azimuth",
"n_plunge",
"p_exponent",
"p_azimuth",
"p_plunge",
"exponent",
],

The parameter name t_exponent, n_exponent, and p_exponent is inaccurate and confusing, and should be renamed to t_value, n_value, and p_value.

I think we should make the change in a backward-compatible way and it should go through the deprecation cycle.

@seisman seisman added the bug Something isn't working label Nov 7, 2021
@seisman seisman added this to the 0.6.0 milestone Jan 4, 2022
@weiji14 weiji14 modified the milestones: 0.6.0, 0.6.1 Mar 11, 2022
@seisman seisman modified the milestones: 0.6.1, 0.7.0 Mar 16, 2022
@seisman seisman modified the milestones: 0.7.0, 0.8.0 Jun 23, 2022
@seisman
Copy link
Member Author

seisman commented Sep 19, 2022

I'm closing the issue without writing codes to make it backward-compatible. The reasons are:

  1. The meca function was rewritten in PR Rewrite the meca function to support offsetting and labeling beachballs #1784, which already brought some incompatible changes
  2. The PRICICIPAL_AXIS convention is not commonly used.
  3. It's a bug and was fixed in Rewrite the meca function to support offsetting and labeling beachballs #1784, and we don't have to keep backward-compatibility with buggy behavior.

Feel free to reopen it if anyone insists that backward-compatibility is necessary for it.

@seisman seisman closed this as completed Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants