Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jobovy/galpy
Galactic Dynamics in python
https://github.com/jobovy/galpy
astronomy astrophysics astropy-affiliated dynamics physics python scientific-computing
Last synced: about 4 hours ago
JSON representation
Galactic Dynamics in python
- Host: GitHub
- URL: https://github.com/jobovy/galpy
- Owner: jobovy
- License: bsd-3-clause
- Created: 2011-09-13T03:20:30.000Z (over 13 years ago)
- Default Branch: main
- Last Pushed: 2025-01-14T14:15:58.000Z (8 days ago)
- Last Synced: 2025-01-14T23:43:06.945Z (7 days ago)
- Topics: astronomy, astrophysics, astropy-affiliated, dynamics, physics, python, scientific-computing
- Language: Python
- Homepage: https://www.galpy.org
- Size: 34.9 MB
- Stars: 233
- Watchers: 20
- Forks: 104
- Open Issues: 5
-
Metadata Files:
- Readme: README.dev
- Changelog: HISTORY.txt
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.cff
- Authors: AUTHORS.txt
Awesome Lists containing this project
README
Develop README
==============Adding a potential to the C integrator
--------------------------------------1) Implement the potential in a .c file under
potential/potential_c_ext. Look at
potential/potential_c_ext/LogarithmicHaloPotential.c for the right
format2) Add your new potential to
potential/potential_c_ext/galpy_potentials.h3) Edit the code under orbit/orbit_c_ext/integratePlanarOrbit.c to
set up your new potential (in the 'parse_leapFuncArgs' function)4) Edit the code in orbit/integratePlanarOrbit.py to set up your
new potential5) Edit the code under orbit/orbit_c_ext/integrateFullOrbit.c to
set up your new potential (in the 'parse_leapFuncArgs_Full' function)6) Edit the code in orbit/integrateFullOrbit.py to set up your
new potential7) Finally, add 'self.hasC= True' to the initialization of the
potential in question (after the initialization of the super class)8) It should work now!
9) If you implement the second derivatives of the potential necessary
to integrate phase-space volumes, also set self.hasC_dxdv=True to the
initialization of the potential in question.10) If you add a potential that gets passed to C as a list, you need
to edit orbit/integrateLinearOrbit.py and
orbit/orbit_c_ext/integrateLinearPotential.c to parse it properly (for
regular 3D potentials this works out of the box).11) If you add a 1D potential, do the steps above, but for
integrateLinearOrbit.*