Giter Club home page Giter Club logo

Comments (3)

jobovy avatar jobovy commented on August 17, 2024

Thanks for the report! There a few things going on here:

  1. turn_physical_on doesn't actually make it that the circular velocity at ro equals vo. It only does that if the potential is normalized such that vc(1.) = 1. in internal units. The latter is, for example, the case for MWPotential2014. In general, using turn_physical_on to change vo will re-scale all velocities by new_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.
  2. Now, you might think that McMillan17 is such that vc(1.) = 1. in internal units, but the way it's defined that's not quite the case and in fact vc(1.) = 1.000424466056599. This slight difference from one leads to the issue that you see. This is, in fact, also an issue with the normal McMillan17 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 the McMillan17 potential is solved for in galpy (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.

gregsalvesen avatar gregsalvesen commented on August 17, 2024

Thanks so much for the thoughtful response and clear explanation!

from galpy.

github-actions avatar github-actions commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.