dlilien / ImpDAR

An impulse radar processor
GNU General Public License v3.0
27 stars 19 forks source link

Eliminate decimation during Stolt migration #44

Closed dlilien closed 1 year ago

dlilien commented 1 year ago

For FK migration, we had been using a complex fft on real data, then decimating (i.e. taking every other sample). I think this was a bug introduced by conversion from a Matlab script, although I am not positive. I see no reason, though, why this shouldn't be information-preserving.

I moved to using numpy's rfft, irfft, etc. There are additional changes to use RectBivariateSpline because of deprecation of interp2d. Tests pass and this looks good in the demo notebook.

@benhills, can you confirm that this acceptable before I merge it?

codecov[bot] commented 1 year ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (3c1d992) 78.24% compared to head (4f26a45) 79.74%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #44 +/- ## ========================================== + Coverage 78.24% 79.74% +1.49% ========================================== Files 61 61 Lines 6910 6918 +8 ========================================== + Hits 5407 5517 +110 + Misses 1503 1401 -102 ``` | [Files](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien) | Coverage Δ | | |---|---|---| | [impdar/gui/pickgui.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2d1aS9waWNrZ3VpLnB5) | `61.56% <100.00%> (ø)` | | | [impdar/lib/NoInitRadarData.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9Ob0luaXRSYWRhckRhdGEucHk=) | `100.00% <100.00%> (ø)` | | | [impdar/lib/RadarData/\_RadarDataProcessing.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9SYWRhckRhdGEvX1JhZGFyRGF0YVByb2Nlc3NpbmcucHk=) | `98.23% <100.00%> (-0.36%)` | :arrow_down: | | [impdar/lib/RadarData/\_RadarDataSaving.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9SYWRhckRhdGEvX1JhZGFyRGF0YVNhdmluZy5weQ==) | `84.80% <100.00%> (+0.37%)` | :arrow_up: | | [impdar/lib/gpslib.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9ncHNsaWIucHk=) | `85.55% <100.00%> (+6.31%)` | :arrow_up: | | [impdar/lib/migrationlib/mig\_python.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9taWdyYXRpb25saWIvbWlnX3B5dGhvbi5weQ==) | `95.23% <100.00%> (-0.07%)` | :arrow_down: | | [impdar/lib/picklib.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9waWNrbGliLnB5) | `100.00% <100.00%> (+34.44%)` | :arrow_up: | | [impdar/lib/plot.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9wbG90LnB5) | `97.75% <100.00%> (ø)` | | | [impdar/lib/RadarData/\_RadarDataFiltering.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9SYWRhckRhdGEvX1JhZGFyRGF0YUZpbHRlcmluZy5weQ==) | `99.01% <83.33%> (-0.49%)` | :arrow_down: | | [impdar/lib/load/load\_gssi.py](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien#diff-aW1wZGFyL2xpYi9sb2FkL2xvYWRfZ3NzaS5weQ==) | `91.53% <50.00%> (-1.54%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/dlilien/ImpDAR/pull/44/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Lilien)

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

benhills commented 1 year ago

Code is much cleaner, thanks. If you say it passes and the notebook migration looks good, then I am happy.

dlilien commented 1 year ago

Yep, think it looks good:

Before: image

After: image