Comments (3)
Thanks for the report! There a few things going on here:
turn_physical_on
doesn't actually make it that the circular velocity atro
equalsvo
. It only does that if the potential is normalized such thatvc(1.) = 1.
in internal units. The latter is, for example, the case forMWPotential2014
. In general, usingturn_physical_on
to changevo
will re-scale all velocities bynew_vo/old_vo
. If you want to make the circular velocity a particular value at a particular radius, the best thing to do would be to compute the amplitude rescaling that makes this the case and then multiply the potential with that re-scaling.- Now, you might think that
McMillan17
is such thatvc(1.) = 1.
in internal units, but the way it's defined that's not quite the case and in factvc(1.) = 1.000424466056599
. This slight difference from one leads to the issue that you see. This is, in fact, also an issue with the normalMcMillan17
scaling, for which the circular velocity at R0 should be 233.1 km/s, but in galpy it's 233.2 km/s. This numerical inaccuracy results from how theMcMillan17
potential is solved for ingalpy
(because it is a density-based model, we need to solve for the potential and that solution isn't perfect). The difference is much smaller than the uncertainty in the circular velocity, so shouldn't matter in practice, but of course there could be situations and tests where you need to account for it.
The only real bug here is that the McMillan17
circular velocity is in general ~0.1 km/s off, but as I explained above, I don't think that's an important issue (solving it would make using McMillan17
even more computationally expensive than it already is).
from galpy.
Thanks so much for the thoughtful response and clear explanation!
from galpy.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue has been resolved since the last activity, please close the issue. Thank you for your contributions.
from galpy.
Related Issues (20)
- Make ``quasiisothermaldf`` documentation consistent with the latest version of the code
- dop853_c integrator not working when integration doesn't start from 0 HOT 1
- Unpredictable behaviour in galpy.utils.coords
- Attempting to use other unit systems with galpy breaks silently HOT 2
- Local installation with `pip` does not seem to work
- list of array without astropy unit as vxvv to Orbit have no useful error msg HOT 2
- Birth location of an object changes with different time ranges HOT 1
- negative mass returned from galpy.potential.mass HOT 1
- Use System's PaulMcMillan-Astro/Torus where it's posible HOT 2
- keyword parameter t in galpy.orbit.Orbits.Orbit._call_internal will be ignored in some cases HOT 3
- Remove ignoring of `'xdrlib' is deprecated and slated for removal in Python 3.13` in test CI once it's no longer necessary
- `plotPotentials` and `Potential.plot` Lz input should be able to be a Quantity
- `plotPotentials` and `Potential.plot`: cannot use `effective` and `xy` at the same time
- Remove deprecated features in v1.9 HOT 1
- Cannot access galpy.util.coords HOT 1
- Wrapper potentials silently fail when applied to DissipativeForces
- Implement the IAS15 integrator HOT 3
- `libopenblas` version > 0.3.23 causes OpenMP error on Mac HOT 1
- deepcopy error when trying to load galpy potential HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from galpy.