-
Notifications
You must be signed in to change notification settings - Fork 229
Fix missing gcmt convention keys in pygmt.meca #1611
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
Conversation
Adds the 'rake1' and 'strike2' keys to the global CMT (gcmt) convention, and add a unit test adapted from https://docs.generic-mapping-tools.org/6.2/supplements/seis/meca.html#examples.
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)Report last updated at commit b59c03a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Ping @tjnewton and @liamtoney for reviews, since they were the main authors of the original PR #516. |
@@ -275,23 +284,21 @@ def update_pointers(data_pointers): | |||
"plot_latitude": plot_latitude, | |||
} | |||
|
|||
# make a DataFrame copy to check convention if it contains | |||
# other parameters | |||
if isinstance(spec, (dict, pd.DataFrame)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that this if-statement is unnecessary, because this code block is already nested under an if isinstance(spec, (dict, pd.DataFrame))
statement at L143 above, and there doesn't seem to be any modifications made to the spec
variable in between. Please double-check if this looks ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Looks great
) Adds the 'rake1' and 'strike2' keys to the global CMT (gcmt) convention, and add a unit test adapted from https://docs.generic-mapping-tools.org/6.2/supplements/seis/meca.html#examples. * Remove an unneeded if-statement and pylint disable argument
Description of proposed changes
Adds the 'rake1' and 'strike2' keys to the global CMT (gcmt) convention, and add a unit test adapted from https://docs.generic-mapping-tools.org/6.2/supplements/seis/meca.html#examples.
Fixes #1580, Patches #516.
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version