Skip to content

Commit

Permalink
Merge pull request #444 from morganb-phys/scfnbody
Browse files Browse the repository at this point in the history
Calculation of SCF expansion based on an N-body representation of the density
  • Loading branch information
jobovy committed Feb 23, 2021
2 parents 9ac4b58 + b69966b commit dd84204
Show file tree
Hide file tree
Showing 9 changed files with 551 additions and 193 deletions.
4 changes: 3 additions & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Samuel Wong (sampleV_interpolate method of quasiisothermaldf)
James Lane (General mass distributions in MovingObjectPotential)
Henry Leung (addition of Python and C implementation of Dormand-Prince 8(5,3) integrator)
Nathaniel Starkman (custom coordinates in bovy_coords, DehnenSphericalPotential, time dependences in potential, amuse-astropy Potential compatibility)
Morgan Bennett (scf_compute_.._nbody functions for computing SCF expansions for N-body sims)

General help:
==============
Expand All @@ -36,7 +37,7 @@ Brigitta Sipocz (help with conda build)

Bug reports:
============
(incomplete list, apologies if I forgot anybody!)
(very incomplete list, apologies if I forgot anybody!)

Alexander de la Vega
Wai-Hin Ngan
Expand All @@ -53,3 +54,4 @@ Ruth Angus
Anthony Brown
Larry Widrow
Jean-François Robitaille
...
4 changes: 4 additions & 0 deletions HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ v1.7 (XXXX-XX-XX)
sampled, and their velocity moments can be computed. Work started in
#432 and continued on from there.

- Implemented the calculation of SCF density/potential expansion
coefficients based on an N-body representation of the density
(#444).

- Added NFWPotential initialization method using rmax and vmax, the
radius and alue at which the rotation curve peaks; also added rmax
and vmax methods to NFWPotential to compute these quantities for any
Expand Down
3 changes: 3 additions & 0 deletions doc/source/reference/potential.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ In addition to these, the following methods are available to compute expansion c

scf_compute_coeffs <potentialscfcompute.rst>
scf_compute_coeffs_axi <potentialscfcomputeaxi.rst>
scf_compute_coeffs_axi_nbody <potentialscfcomputeaxinbody.rst>
scf_compute_coeffs_nbody <potentialscfcomputenbody.rst>
scf_compute_coeffs_spherical <potentialscfcomputesphere.rst>
scf_compute_coeffs_spherical_nbody <potentialscfcomputespherenbody.rst>

Specific potentials
+++++++++++++++++++
Expand Down
13 changes: 13 additions & 0 deletions doc/source/reference/potentialscfcomputeaxinbody.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _scf_compute_coeffs_axi_nbody:

galpy.potential.scf_compute_coeffs_axi_nbody
============================================

This function is the equivalent to :ref:`scf_compute_coeffs_axi` but computing the coefficients based on an N-body representation of the density.

Note: This function computes Acos and Asin as defined in `Hernquist & Ostriker (1992) <http://adsabs.harvard.edu/abs/1992ApJ...386..375H>`_, except that we multiply Acos by 2 such that the density from :ref:`Galpy's Hernquist Potential <hernquist_potential>` corresponds to :math:`Acos = \delta_{0n}\delta_{0l}\delta_{0m}`.

Further note that this function is a specification of :ref:`scf_compute_coeffs_nbody` where :math:`Acos_{nlm} = 0` at :math:`m\neq0` and :math:`Asin_{nlm} = None`.

.. autofunction:: galpy.potential.scf_compute_coeffs_axi_nbody

11 changes: 11 additions & 0 deletions doc/source/reference/potentialscfcomputenbody.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _scf_compute_coeffs_nbody:

galpy.potential.scf_compute_coeffs_nbody
========================================

This function is the equivalent to :ref:`scf_compute_coeffs` but computing the coefficients based on an N-body representation of the density.

Note: This function computes Acos and Asin as defined in `Hernquist & Ostriker (1992) <http://adsabs.harvard.edu/abs/1992ApJ...386..375H>`_, except that we multiply Acos and Asin by 2 such that the density from :ref:`Galpy's Hernquist Potential <hernquist_potential>` corresponds to :math:`Acos = \delta_{0n}\delta_{0l}\delta_{0m}` and :math:`Asin = 0`.

.. autofunction:: galpy.potential.scf_compute_coeffs_nbody

13 changes: 13 additions & 0 deletions doc/source/reference/potentialscfcomputespherenbody.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _scf_compute_coeffs_sphere_nbody:

galpy.potential.scf_compute_coeffs_spherical_nbody
==================================================

This function is the equivalent to :ref:`scf_compute_coeffs_sphere` but computing the coefficients based on an N-body representation of the density.

Note: This function computes Acos and Asin as defined in `Hernquist & Ostriker (1992) <http://adsabs.harvard.edu/abs/1992ApJ...386..375H>`_, except that we multiply Acos by 2 such that the density from :ref:`Galpy's Hernquist Potential <hernquist_potential>` corresponds to :math:`Acos = \delta_{0n}\delta_{0l}\delta_{0m}`.

Futher note that this function is a specification of :ref:`scf_compute_coeffs_nbody` where :math:`Acos_{nlm} = 0` at :math:`l\neq0`

.. autofunction:: galpy.potential.scf_compute_coeffs_spherical_nbody

0 comments on commit dd84204

Please sign in to comment.