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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _Rzderiv to TwoPowerSphericalPotential #440

Merged
merged 2 commits into from
Nov 30, 2020
Merged

Conversation

gusbeane
Copy link
Contributor

Sorry for making two PRs, didnt realize I also needed Rzderiv in my previous one 馃槄

here's a code tidbit for testing it numerically

from galpy.potential import TwoPowerSphericalPotential
import numpy as np
pot = TwoPowerSphericalPotential()
assert np.abs(pot.Rzderiv(1, 0.5) + (pot.Rforce(1, 0.5+1E-8) - pot.Rforce(1, 0.5-1E-8)) / 2E-8 ) < 1E-8
assert np.abs(pot.Rzderiv(3, 0) + (pot.Rforce(3, 1E-8) - pot.Rforce(3, -1E-8)) / 2E-8 ) < 1E-8

@codecov
Copy link

codecov bot commented Nov 29, 2020

Codecov Report

Merging #440 (d6db971) into master (c8029ee) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #440   +/-   ##
=======================================
  Coverage   99.82%   99.82%           
=======================================
  Files         178      178           
  Lines       25443    25451    +8     
=======================================
+ Hits        25398    25406    +8     
  Misses         45       45           
Impacted Files Coverage 螖
galpy/potential/TwoPowerSphericalPotential.py 100.00% <100.00%> (酶)

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 c8029ee...d6db971. Read the comment docs.

@jobovy
Copy link
Owner

jobovy commented Nov 30, 2020

Thanks, that's great, all looks good

@jobovy jobovy merged commit 1e5c2f8 into jobovy:master Nov 30, 2020
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.

None yet

2 participants