8000 Handle denormalized numbers when normalizing intensities/codebooks by ttung · Pull Request #1371 · spacetx/starfish · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Handle denormalized numbers when normalizing intensities/codebooks #1371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2019

Conversation

ttung
Copy link
Collaborator
@ttung ttung commented May 23, 2019

When there are intensities that are near-zero (due to numpy generating some denorm-to-zero values instead of zeros), we sometimes get near-zero total intensity. When we normalize that, we get infinite values. Instead of using fillna, we replace anything that is not finite with the partitioned value.

Test plan: make fast and on the linux docker container, I verified that the code snipped posted by @richardque works now.

Fixes #1365

@ttung ttung requested review from dganguli and ambrosejcarr May 23, 2019 18:13
@ttung ttung force-pushed the tonytung-denorm branch from 55871c6 to ebf9b14 Compare May 23, 2019 18:14
@codecov-io
Copy link
codecov-io commented May 23, 2019

Codecov Report

Merging #1371 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1371   +/-   ##
=======================================
  Coverage   89.21%   89.21%           
=======================================
  Files         148      148           
  Lines        5377     5377           
=======================================
  Hits         4797     4797           
  Misses        580      580
Impacted Files Coverage Δ
starfish/core/codebook/codebook.py 96.85% <100%> (ø) ⬆️

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 618e891...20f7f98. Read the comment docs.

@ttung ttung force-pushed the tonytung-denorm branch 2 times, most recently from 6029710 to 0de03d9 Compare May 23, 2019 20:03
When there are intensities that are near-zero (due to numpy generating some denorm-to-zero values instead of zeros), we sometimes get near-zero total intensity.  When we normalize that, we get infinite values.  Instead of using `fillna`, we replace anything that is not finite with the partitioned value.

Test plan: `make fast` and on the linux docker container, I verified that the code snipped posted by @richardque works now.

Fixes #1365
@ttung ttung force-pushed the tonytung-denorm branch from 0de03d9 to 20f7f98 Compare May 24, 2019 18:37
Copy link
Member
@ambrosejcarr ambrosejcarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ttung ttung merged commit 9d19a40 into master May 30, 2019
@ttung ttung deleted the tonytung-denorm branch May 30, 2019 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error running PxPx decoding when setting normalize=True for ZeroByChannelMagnitude filter
3 participants
0