mehta-lab / waveorder

Wave optical models and inverse algorithms for label-agnostic imaging of density & orientation.
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Divide by zero during phase normalization #140

Open talonchandler opened 11 months ago

talonchandler commented 11 months ago

recOrder tests surfaced the following warning.

recOrder/tests/cli_tests/test_reconstruct.py::test_reconstruct
  /Users/talon.chandler/waveorder/waveorder/util.py:711: RuntimeWarning: invalid value encountered in divide
    img_norm_stack[i] = img_stack[i] / uniform_filter(

This section is used by the isotropic_thin_3d reconstruction during normalization before reconstruction. This division was copied directly from pre-alg-dev code, and these reconstructions are passing our qualitative tests and I'm not concerned about deep problems here.

~This issue is related to #88.~ Edit: uniform_filter is from scipy while uniform_filter_2D is a custom implementation.