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

Replace get_velocities in elson.py #534

Open
carlrodriguez opened this issue May 19, 2021 · 2 comments
Open

Replace get_velocities in elson.py #534

carlrodriguez opened this issue May 19, 2021 · 2 comments

Comments

@carlrodriguez
Copy link
Contributor

right now the get_velocities throws some integration warnings when sampling from an Elson profile, largely because when numerically integrating the distribution function, you get a lot of roundoff error when the energy goes to zero. this is fine, especially for a generic Elson profile, but the Plummer profile (which is Elson when gamma=4) has an analytic distribution function that can be sampled directly, and would be a lot faster and not throw errors (which don't effect the results, but looks sloppy).

Carl, put in a special case function to draw from that distribution function when gamma=4

@carlrodriguez
Copy link
Contributor Author

This is done in the latest PR

@carlrodriguez
Copy link
Contributor Author

So somehow this code never made it in? And the PR that supposedly fixed this is empty. Not sure what happened, but I'm going to have to code this up again and do another PR.

@carlrodriguez carlrodriguez reopened this Oct 25, 2021
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

No branches or pull requests

1 participant