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 module with Milky-Way-like potentials #395

Merged
merged 32 commits into from Aug 8, 2019
Merged

Add module with Milky-Way-like potentials #395

merged 32 commits into from Aug 8, 2019

Conversation

jobovy
Copy link
Owner

@jobovy jobovy commented Aug 8, 2019

This PR adds a module galpy.potential.mwpotentials with various models for the Milky Way's gravitational potential. Included now are McMillan17 for the potential of McMillan (2017) and the three models from Irrgang et al. (2013): Irrgang13I, Irrgang13II, and Irrgang13III. MWPotential2014 has also been moved to this module, but it can also still be imported directly from galpy.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.

jobovy and others added 30 commits July 31, 2019 16:19
…potentials (MWPotential and MWPotential2014)
…ly-loaded

Co-authored-by:  Ted Mackereth <tedmackereth@gmail.com>
…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
@codecov-io
Copy link

Codecov Report

Merging #395 into master will increase coverage by 0.98%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...py/potential/NumericalPotentialDerivativesMixin.py 100% <100%> (ø)
galpy/potential/_mcmillan17.py 100% <100%> (ø)
galpy/potential/SCFPotential.py 99.7% <100%> (ø) ⬆️
galpy/potential/Irrgang13.py 100% <100%> (ø)
galpy/util/bovy_conversion.py 100% <100%> (ø) ⬆️
galpy/potential/DiskSCFPotential.py 100% <100%> (ø) ⬆️
galpy/potential/__init__.py 100% <100%> (ø) ⬆️
galpy/potential/mwpotentials.py 100% <100%> (ø)
... and 6 more

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 fa6da76...ced0943. Read the comment docs.

@jobovy jobovy merged commit b4a4378 into master Aug 8, 2019
@jobovy jobovy deleted the mwpotentials branch August 9, 2019 01:35
@jobovy jobovy added this to the v1.5 milestone Aug 13, 2019
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