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

Wrap wiggle #1145

Merged
merged 25 commits into from
Apr 24, 2021
Merged

Wrap wiggle #1145

merged 25 commits into from
Apr 24, 2021

Conversation

core-man
Copy link
Member

@core-man core-man commented Mar 29, 2021

Description of proposed changes

Wrap wiggle.

The following special alias is added:

  • D: position
  • T: track
  • Z: scale

A simple gallery example revised from GMT examples is added.

A simple test revised from the example above is added.


To be updated:

Some common alias needs to be added, e.g., t (transparency). Note that column will be renamed to incols.

Some special alias needs to be added, e.g., A, C, F, I


Fixes #1114

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 adding new functionality, add an example to docstrings or tutorials.

Slash Commands

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

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@core-man core-man marked this pull request as draft March 29, 2021 09:04
@core-man core-man changed the title Wiggle WIP: Wrap Wiggle Mar 29, 2021
@core-man core-man changed the title WIP: Wrap Wiggle WIP: Wrap wiggle Mar 29, 2021
@core-man core-man self-assigned this Mar 29, 2021
@seisman seisman added the feature Brand new feature label Mar 29, 2021
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Hi @core-man, just reviewed your implementation of wiggle and it looks pretty good! Only a few minor comments for now. Let us know if you need help with adding a unit test, you could just adapt your gallery example into a unit test (but simplify it as much as possible, take out unnecessary arguments like frame perhaps).

Oh, and just to prevent this PR from taking up too much time (speaking from experience), please don't wrap every single alias for wiggle right now, just keep it to the bare minimum. We can complete the long alias list in a separate PR.

pygmt/src/wiggle.py Outdated Show resolved Hide resolved
pygmt/src/wiggle.py Outdated Show resolved Hide resolved
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@weiji14
Copy link
Member

weiji14 commented Apr 6, 2021

Oh, and please remember to add wiggle to doc/api/index.rst.

@weiji14 weiji14 added this to the 0.4.0 milestone Apr 6, 2021
@core-man
Copy link
Member Author

core-man commented Apr 6, 2021

Hi @core-man, just reviewed your implementation of wiggle and it looks pretty good! Only a few minor comments for now. Let us know if you need help with adding a unit test, you could just adapt your gallery example into a unit test (but simplify it as much as possible, take out unnecessary arguments like frame perhaps).

Thank you. Will Ping you when I need help. I am preparing for the job interview these two weeks. Will come back soon next week.

Oh, and just to prevent this PR from taking up too much time (speaking from experience), please don't wrap every single alias for wiggle right now, just keep it to the bare minimum. We can complete the long alias list in a separate PR.

Good to know. I thought to wrap all the arguments in one PR.

@core-man core-man changed the title WIP: Wrap wiggle Wrap wiggle Apr 14, 2021
examples/gallery/seismology/wiggle.py Outdated Show resolved Hide resolved
examples/gallery/seismology/wiggle.py Outdated Show resolved Hide resolved
examples/gallery/seismology/wiggle.py Outdated Show resolved Hide resolved
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
@core-man
Copy link
Member Author

@michaelgrund Thanks for the review.

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

I'm happy with the def wiggle() code implementation and single unit test, and you've wrapped the main required parameter scale (Z) and a couple of other basic ones which is good. Just a few minor edits and it should be 🤞 close to merging.

examples/gallery/seismology/wiggle.py Outdated Show resolved Hide resolved
examples/gallery/seismology/wiggle.py Outdated Show resolved Hide resolved
pygmt/tests/test_wiggle.py Outdated Show resolved Hide resolved
@weiji14 weiji14 requested a review from a team April 23, 2021 01:55
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@weiji14
Copy link
Member

weiji14 commented Apr 23, 2021

This is an auto-generated report of images that have changed on the DVC remote

Status Path
added pygmt/tests/baseline/test_wiggle.png

Image diff(s)

Added images

  • pygmt/tests/baseline/test_wiggle.png

Modified images

Path Old New

@weiji14 weiji14 added the final review call This PR requires final review and approval from a second reviewer label Apr 23, 2021
pygmt/src/wiggle.py Outdated Show resolved Hide resolved
pygmt/src/wiggle.py Outdated Show resolved Hide resolved
@@ -0,0 +1,38 @@
"""
Copy link
Member

Choose a reason for hiding this comment

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

I don't think wiggle is a seismology-specific module. I recommend moving the example to the "Line" category.

Copy link
Member Author

@core-man core-man Apr 23, 2021

Choose a reason for hiding this comment

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

okay. @seisman done in 3f32058.

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Copy link
Member

@michaelgrund michaelgrund left a comment

Choose a reason for hiding this comment

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

Agree with @seisman to move the gallery example to the "Line" category since e.g. traces of active reflection seismic data are also often plotted in such way (and not only seismology related content). Except that point, I'm fine with that PR. Great work!

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 24, 2021
@seisman seisman merged commit 9fb1cec into GenericMappingTools:master Apr 24, 2021
@core-man core-man deleted the wiggle branch April 24, 2021 12:03
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Brand new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fill positive areas in ploting (add GMT wiggle module)
4 participants