Skip to content

Figure.meca: Improve documentation#3517

Merged
seisman merged 20 commits into
mainfrom
improve-doc-meca
Dec 29, 2024
Merged

Figure.meca: Improve documentation#3517
seisman merged 20 commits into
mainfrom
improve-doc-meca

Conversation

@yvonnefroehlich

@yvonnefroehlich yvonnefroehlich commented Oct 15, 2024

Copy link
Copy Markdown
Member

Description of proposed changes

Some improvements of the documetation of Figure.meca:

  • rewrapp line length
  • add missing articels
  • shorten formulations

Preview: https://pygmt-dev--3517.org.readthedocs.build/en/3517/api/generated/pygmt.Figure.meca.html

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Oct 15, 2024
@yvonnefroehlich yvonnefroehlich added this to the 0.14.0 milestone Oct 15, 2024
@yvonnefroehlich yvonnefroehlich self-assigned this Oct 15, 2024
@yvonnefroehlich yvonnefroehlich changed the title WIP: DOC: Improve documentation of Figure.meca DOC: Improve documentation of Figure.meca Oct 15, 2024
@yvonnefroehlich yvonnefroehlich changed the title DOC: Improve documentation of Figure.meca WIP: DOC: Improve documentation of Figure.meca Oct 15, 2024
@yvonnefroehlich

Copy link
Copy Markdown
Member Author

/format

@yvonnefroehlich yvonnefroehlich changed the title WIP: DOC: Improve documentation of Figure.meca WIP: DOC/Figure.meca: Improve documentation Nov 1, 2024
@yvonnefroehlich yvonnefroehlich changed the title WIP: DOC/Figure.meca: Improve documentation WIP: Figure.meca: Improve documentation Nov 1, 2024
@yvonnefroehlich yvonnefroehlich mentioned this pull request Dec 16, 2024
49 tasks
@seisman

seisman commented Dec 24, 2024

Copy link
Copy Markdown
Member

@yvonnefroehlich What's the status of this PR? Do you think we can finish it in v0.14.0?

Comment thread doc/conf.py Outdated
@yvonnefroehlich

Copy link
Copy Markdown
Member Author

@yvonnefroehlich What's the status of this PR? Do you think we can finish it in v0.14.0?

I just resolved the merge conflicts and will look later what is missing here.

Comment thread pygmt/src/meca.py Outdated
Comment thread pygmt/src/meca.py Outdated
Comment thread pygmt/src/meca.py Outdated
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@yvonnefroehlich yvonnefroehlich changed the title WIP: Figure.meca: Improve documentation Figure.meca: Improve documentation Dec 27, 2024
Comment thread pygmt/src/meca.py Outdated
Comment thread pygmt/src/meca.py Outdated
Comment on lines +253 to +262
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*

@seisman seisman Dec 27, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding a table about focal mechanism conventions before the parameter list, then we can shorten this part. The table can be like:

Convention Description Focal parameters
"aki" Aki & Richard strike, dip, rake, magnitude
... ... ...

Of course, it can be done in future PRs if you prefer to have this PR merged in v0.14.0

@yvonnefroehlich yvonnefroehlich Dec 27, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good idea. A table makes these different options more readable. And later we can point to this table in the beachball tutorial and short the introduction part there. Can give it a try in a separat PR.

yvonnefroehlich and others added 2 commits December 27, 2024 22:02
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants