Skip to content

Feature/tapered selection#49

Merged
atrabattoni merged 9 commits intodevfrom
feature/tapered_selection
Dec 2, 2025
Merged

Feature/tapered selection#49
atrabattoni merged 9 commits intodevfrom
feature/tapered_selection

Conversation

@atrabattoni
Copy link
Copy Markdown
Contributor

Add xdas.picking.tapered_selection with tests

It is mainly intended to extract portion of the waveforms around picks for magnitude estimation and/or cross-correlation.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 58.33333% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.81%. Comparing base (c94910b) to head (364ebe4).
⚠️ Report is 10 commits behind head on dev.

Files with missing lines Patch % Lines
xdas/picking.py 58.33% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #49      +/-   ##
==========================================
- Coverage   82.15%   81.81%   -0.35%     
==========================================
  Files          36       37       +1     
  Lines        4091     4151      +60     
==========================================
+ Hits         3361     3396      +35     
- Misses        730      755      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atrabattoni
Copy link
Copy Markdown
Contributor Author

Add doc

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new function xdas.picking.tapered_selection to extract portions of waveforms around picks for magnitude estimation and cross-correlation. The implementation includes comprehensive test coverage and documentation.

  • Adds tapered_selection function for selecting and tapering DataArray segments based on start/end values
  • Includes parallel JIT-compiled implementation using Numba for efficient processing
  • Updates test files to use consistent xd import alias for the xdas module

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
xdas/picking.py New module implementing tapered_selection with window-based tapering and parallel processing support
tests/test_picking.py Comprehensive test suite covering basic functionality, window handling, size specification, and multi-dimensional selection
docs/api/picking.md API documentation for the new picking module
tests/test_signal.py Refactored to use consistent xd import alias instead of xdas

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

xdas/picking.py Outdated
Comment on lines +25 to +28
same size) NaN or NaT values indicate coordinates to ignored.
end : array-like
End values along the other dimension than `dim` (must be 1D and have the
same size) NaN or NaT values indicate coordinates to ignored.
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

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

The docstring contains grammatical errors. "indicate coordinates to ignored" should be "indicate coordinates to be ignored".

Suggested change
same size) NaN or NaT values indicate coordinates to ignored.
end : array-like
End values along the other dimension than `dim` (must be 1D and have the
same size) NaN or NaT values indicate coordinates to ignored.
same size) NaN or NaT values indicate coordinates to be ignored.
end : array-like
End values along the other dimension than `dim` (must be 1D and have the
same size) NaN or NaT values indicate coordinates to be ignored.

Copilot uses AI. Check for mistakes.
atrabattoni and others added 3 commits December 2, 2025 17:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI commented Dec 2, 2025

@atrabattoni I've opened a new pull request, #50, to work on those changes. Once the pull request is ready, I'll request review from you.

@atrabattoni atrabattoni merged commit f397c9e into dev Dec 2, 2025
5 of 7 checks passed
@atrabattoni atrabattoni deleted the feature/tapered_selection branch March 5, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants