Skip to content

Wrap wiggle - #1145

Merged
seisman merged 25 commits into
GenericMappingTools:masterfrom
core-man:wiggle
Apr 24, 2021
Merged

Wrap wiggle#1145
seisman merged 25 commits into
GenericMappingTools:masterfrom
core-man:wiggle

Conversation

@core-man

@core-mancore-man commented Mar 29, 2021

Copy link
Copy Markdown
Member

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-mancore-man changed the title WiggleWIP: Wrap WiggleMar 29, 2021
@core-mancore-man changed the title WIP: Wrap WiggleWIP: Wrap wiggleMar 29, 2021
@core-mancore-man self-assigned this Mar 29, 2021
@seismanseisman added the feature Brand new feature label Mar 29, 2021

@weiji14weiji14 left a comment

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.

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.

Comment threadpygmt/src/wiggle.py Outdated
Comment threadpygmt/src/wiggle.py Outdated
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@weiji14

Copy link
Copy Markdown
Member

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

@weiji14weiji14 added this to the 0.4.0 milestone Apr 6, 2021
@core-man

Copy link
Copy Markdown
MemberAuthor

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.

@weiji14weiji14 mentioned this pull request Apr 7, 2021
5 tasks
@core-mancore-man changed the title WIP: Wrap wiggleWrap wiggleApr 14, 2021
Comment threadexamples/gallery/seismology/wiggle.py Outdated
Comment threadexamples/gallery/seismology/wiggle.py Outdated
Comment threadexamples/gallery/seismology/wiggle.py Outdated
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
@core-man

Copy link
Copy Markdown
MemberAuthor

@michaelgrund Thanks for the review.

@weiji14weiji14 left a comment

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.

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.

Comment threadexamples/gallery/seismology/wiggle.py Outdated
Comment threadexamples/gallery/seismology/wiggle.py Outdated
Comment threadpygmt/tests/test_wiggle.py Outdated
@weiji14
weiji14 requested a review from a teamApril 23, 2021 01:55
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@weiji14

Copy link
Copy Markdown
Member

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

StatusPath
addedpygmt/tests/baseline/test_wiggle.png

Image diff(s)

Details

Added images

  • pygmt/tests/baseline/test_wiggle.png

Modified images

PathOldNew

@weiji14weiji14 added the final review call This PR requires final review and approval from a second reviewer label Apr 23, 2021
Comment threadpygmt/src/wiggle.py Outdated
Comment threadpygmt/src/wiggle.py Outdated
@@ -0,0 +1,38 @@
"""

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.

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

@core-mancore-manApr 23, 2021

Copy link
Copy Markdown
MemberAuthor

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>

@michaelgrundmichaelgrund left a comment

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.

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!

@seismanseisman 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:masterApr 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

featureBrand 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

@core-man@weiji14@seisman@michaelgrund