Skip to content

Conversation

@garrettwrong
Copy link
Collaborator

Odd resolution images could generate omegas outside grid (0.9999999 to 89.0000001 vs 1 to 89). Allow extrapolation in this case instead of zero fill which will crash in later (PowerFilter) computations. The exact case to produce this situation was a user supplied stack of 89x89 images, directly or under various odd downsample resolutions.

Also implements short circuit optimization for case where transfer function grid is expected to be identical to interpolation grid. No need to interpolate there. The reported case is one of these situations where no interpolation was even necessary.

Resolves #401 nans.

Odd resolution images could cause omegas outside grid (arithmetic noise 1 vs 0.9999999).  Allow extrapolation in this case instead of zero fill which will crash in later (PowerFilter) computations.

Also implements short circuit optimization for case where transfer function grid is expected to be identical to interpolation grid.  No need to interpolate there.
@garrettwrong garrettwrong added the bug Something isn't working label Mar 26, 2021
@garrettwrong garrettwrong self-assigned this Mar 26, 2021
@garrettwrong garrettwrong requested a review from janden as a code owner March 26, 2021 15:35
@garrettwrong garrettwrong requested a review from itaysason March 26, 2021 15:35
@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #409 (75f388c) into develop (8b920f4) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #409      +/-   ##
===========================================
+ Coverage    86.90%   86.92%   +0.01%     
===========================================
  Files           91       91              
  Lines         6162     6171       +9     
===========================================
+ Hits          5355     5364       +9     
  Misses         807      807              
Impacted Files Coverage Δ
src/aspire/operators/filters.py 96.11% <100.00%> (+0.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b920f4...75f388c. Read the comment docs.

@garrettwrong garrettwrong linked an issue Mar 26, 2021 that may be closed by this pull request
@garrettwrong garrettwrong merged commit 015992e into develop Apr 14, 2021
@garrettwrong garrettwrong deleted the fix_interp_whitening branch April 14, 2021 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImageSource.whiten return nans

3 participants