DASDAE / dascore

A python library for distributed fiber optic sensing
Other
71 stars 16 forks source link

FK(velocity/slope) filter #413

Closed Shihao-Yuan closed 1 month ago

Shihao-Yuan commented 1 month ago

Description

Implementing a frequency-wavenumber (F-K) filter to isolate seismic waves within a specified range of apparent velocities. This filter can also function as a directional filter, allowing for the selection of waves propagating in specific directions, such as upward/downward or leftward/rightward.

Relevant discussions #405

Checklist

I have (if applicable):

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.84%. Comparing base (99f4468) to head (32b7c18). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #413 +/- ## ======================================= Coverage 99.84% 99.84% ======================================= Files 109 109 Lines 8843 8894 +51 ======================================= + Hits 8829 8880 +51 Misses 14 14 ``` | [Flag](https://app.codecov.io/gh/DASDAE/dascore/pull/413/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DASDAE) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/DASDAE/dascore/pull/413/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DASDAE) | `99.84% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DASDAE#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

d-chambers commented 1 month ago

Hey @Shihao-Yuan,

The failure above is caused by incomplete test coverage. When you click on the details you can see the lines that aren't covered. In this case, the problem was with the case where the input patch was already in the FK domain.

I just pushed a couple of tweaks. Mainly, I grouped the internal logic of slope_filter into sub functions just to improve organization. I also added some more tests and made the function general so it can work with dimensions of any name (not just time and distance).

Let me know what you think.

d-chambers commented 1 month ago

@Shihao-Yuan, feel free to squash and merge when you are happy with the PR.