Comments (7)
ok, it turned out to be not such a big deal to add an extra dimensional parameter (length unit) to the Logarithmic potential, and restore the invariance of its zero-point w.r.t. the choice of units (available in the latest commit).
from agama.
BTW: I'm assuming, based on this code in the potential factory that what is input to agama.Potential(..., scaleradius)
actually becomes the coreradius
in the defined logarithmic potential..
from agama.
hmm, when I run the first snippet of your code, it prints out 0.0172100968809 – same as the analytic expression..
Did I say that it uses "sigma" anywhere? if so, this must be a mistake; sigma (the velocity dispersion in a self-consistent isothermal model) is \sqrt{2} v0, but the parameters passed to the potential constructor are indeed v0 and scaleRadius (= core radius).
from agama.
Oh, sorry, I forgot something in the snippet -- I had also used:
import astropy.units as u
agama.setUnits(length=u.kpc, time=u.Myr, mass=u.Msun)
I agree -- if I don't do the setUnits
, I get what you see. But not after setUnits
.
from agama.
Did I say that it uses "sigma" anywhere?
The variable names and comment reference sigma here:
Agama/src/potential_analytic.h
Line 92 in 3052049
from agama.
ah, I see.
the problem is actually in the definition of the logarithmic potential:
clearly, a dimensional quantity under the logarithm paves a pathway to nasty surprises! it should be understood (implicitly) as taking setUnits(...)
, you change the value of
I don't know what is the best way to proceed here: one could redefine
Thanks for catching the wrong usage of sigma
– it is indeed intended to be v0
, I will update the code shortly. The docs (reference.pdf) are correct though.
from agama.
Ah, of course - that makes sense.
from agama.
Related Issues (20)
- Cannot install Agama on my Apple Silicon Monterey HOT 23
- Inner cutoff radius for spherical models HOT 4
- Error when Importing Agama: dlopen symbol not found in flat namespace HOT 4
- Memory leak? HOT 1
- Use of new models HOT 4
- explicitly including G in the calculation of Toomre Q in the example? HOT 1
- Generating rotating star clusters HOT 10
- Sampling refinement procedure error HOT 3
- Discrepancy with Galpy when using agama.GalpyPotential HOT 2
- central density of King profile HOT 2
- Gadget-4 plugin HOT 1
- Example python scripts do not work on newer python versions HOT 4
- document of Einasto profile HOT 2
- Versioned tag or release plan HOT 3
- GOMP version issue via python 3.9.8 (agama 1.0) HOT 3
- Kernel dies when using AGAMA after importing sklearn HOT 3
- About the tolerance of the Torus Mapper fitting HOT 2
- Windows Installation not working HOT 2
- compilation fails on CentOS HOT 1
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 agama.