Skip to content
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

Add an option to have approximate Gaussian points instead of solid points with a blur. #578

Merged
merged 2 commits into from
May 18, 2016

Conversation

manthey
Copy link
Contributor

@manthey manthey commented May 16, 2016

This currently depends on the changes in PR #577. It could be separated if necessary.

@codecov-io
Copy link

codecov-io commented May 16, 2016

Current coverage is 72.86%

Merging #578 into master will increase coverage by <.01%

@@             master       #578   diff @@
==========================================
  Files            82         82          
  Lines          7131       7148    +17   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           5191       5208    +17   
  Misses         1940       1940          
  Partials          0          0          

Powered by Codecov. Last updated by 6024c4a...11f7fe8

* the python expression:
* from scipy.stats import norm
* for r in [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]:
* opacity = norm.pdf(r, scale=0.3) / norm.pdf(0, scale=0.3)
Copy link
Member

Choose a reason for hiding this comment

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

@manthey why apply scale to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aashish24, so that it has a sensible radius and fall-off. By using a scale of 0.3, the intensity at radius=1 is approximately 1/256th of the central intensity. This means that all of the pixels in the rendered circle have some impact on the display. If we use a a larger number (such as the default), the circle will still have significant magnitude at the edges of our rendered area. If we use a smaller number, then we won't use the whole area of our circle.

Simplistically, instead of using a scale, we could have scaled the radius. The mathematics are equivalent (we could have used norm.pdf(r/0.3) / norm.pdf(0)).

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the detailed explanation and comment.

@aashish24
Copy link
Member

aashish24 commented May 18, 2016

Lgtm (hit the wrong button on my iPad pro , sorry)

@aashish24 aashish24 closed this May 18, 2016
@aashish24 aashish24 reopened this May 18, 2016
@manthey manthey merged commit e4599eb into master May 18, 2016
@manthey manthey deleted the gaussian-circles branch May 18, 2016 13:34
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.

3 participants