DASDAE / dascore

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

Multi source correlate #400

Closed d-chambers closed 2 months ago

d-chambers commented 2 months ago

Description

This PR changes the correlate function in a few ways:

  1. Multiple sources can now be selected in a single go
  2. Removed the lag parameter as it was redundant (eg the user should do a select on the return value)
  3. Greatly simplified the internals to simply use patch.dft
  4. Adds the Patch.conj method for getting the complex conjugate of a patch
  5. Adds the Patch.correlate_shift for undoing the fft-related shift and scaling
  6. Fixes a few small bugs with coords/units.

supersedes #364

Checklist

I have (if applicable):

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 99.84%. Comparing base (d1dc874) to head (52482bf). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #400 +/- ## ======================================= Coverage 99.83% 99.84% ======================================= Files 109 109 Lines 8731 8780 +49 ======================================= + Hits 8717 8766 +49 Misses 14 14 ``` | [Flag](https://app.codecov.io/gh/DASDAE/dascore/pull/400/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/400/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 2 months ago

I just realized the lag parameter was already merged (#364 didn't introduce it), so we should go through a deprecation cycle before simply removing it.