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 module with Milky-Way-like potentials #395
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…potentials (MWPotential and MWPotential2014)
…ly-loaded Co-authored-by: Ted Mackereth <tedmackereth@gmail.com>
… quantities listed in the paper
… asked for an attribute that doesn't exist
…et a reference to kwargs that can be popped, not a copy; add docs
…ntial so they can be overriden by NumericalPotentialDerivativesMixin
…kSCFPotential code to compute its second derivatives
… done in mwpotentials)
… I agree with their Table values
… II agree with their Table values
… III agree with their Table values
Codecov Report
@@ Coverage Diff @@
## master #395 +/- ##
==========================================
+ Coverage 98.82% 99.81% +0.98%
==========================================
Files 145 149 +4
Lines 23216 23429 +213
==========================================
+ Hits 22944 23385 +441
+ Misses 272 44 -228
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a module
galpy.potential.mwpotentials
with various models for the Milky Way's gravitational potential. Included now areMcMillan17
for the potential of McMillan (2017) and the three models from Irrgang et al. (2013):Irrgang13I
,Irrgang13II
, andIrrgang13III
.MWPotential2014
has also been moved to this module, but it can also still be imported directly fromgalpy.potential
. Eventually this module could also contain models for the non-axisymmetric components of the Milky Way (like the bar), but this has so far not been included.One notable feature is that the code is written such that most of these potentials are lazily-loaded, that is, they are only defined if they are imported by the user. This to avoid the lengthy computations involved in setting up these potentials (many of which require a basis-function expansion, because they contain components not included in galpy) when one imports
galpy.potential
.