DF (``galpy.df``) ================== ``galpy.df`` contains tools for dealing with distribution functions of stars in galaxies. It mainly contains a number of classes that define different types of distribution function, but ``galpy.df.jeans`` also has some tools for solving the Jeans equations for equilibrium systems. Jeans modeling tools (``galpy.df.jeans``) ----------------------------------------- .. toctree:: :maxdepth: 2 sigmar sigmalos General instance routines for all df classes -------------------------------------------- .. toctree:: :maxdepth: 2 turn_physical_off turn_physical_on .. _api_sphericaldfs: **NEW in v1.7** Spherical distribution functions ------------------------------------------------ Isotropic and anisotropic distribution functions for spherical systems. Documentation of these is limited at this point, but generally, one can use them as:: from galpy import potential from galpy.df import isotropicNFWdf np= potential.NFWPotential(amp=1.2,a=2.3) ndf= isotropicNFWdf(pot=np) # sample sam= ndf.sample(n=int(1e6)) print(numpy.std(sam[numpy.fabs(sam.r()-1.2) < 0.1].vr())) # 0.2156787374302913 # Compute vel. dispersion print(ndf.sigmar(1.2)) # 0.21985277878647172 or:: from galpy.df import kingdf kdf= kingdf(M=2.3,rt=1.4,W0=3.) sam= kdf.sample(n=int(1e6)) print(numpy.amax(sam.r())) # 1.3883460662897116 print(numpy.std(sam[numpy.fabs(sam.r()-0.2) < 0.01].vr())) # 1.081298923132113 print(kdf.sigmar(0.2)) # 1.0939934290993467 Various spherical DFs are explicitly implemented (e.g., Hernquist, NFW using a new approximation, King, Plummer) in isotropic and various anisotropic forms. General methods for computing isotropic, constant-beta anisotropic, and Osipkov-Merritt anisotropic for any potential/density pair are also included. General instance routines +++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 __call__ beta sigmar sigmar vmomentdensity Sampling routines ^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 2 sample Specific distribution functions +++++++++++++++++++++++++++++++ The following are isotropic distribution functions .. toctree:: :maxdepth: 2 Arbitrary Eddington-inversion DF Hernquist DF King DF NFW DF Plummer DF Anisotropic versions also exist: .. toctree:: :maxdepth: 2 Arbitrary constant-anisotropy DF Arbitrary Osipkov-Merritt DF Hernquist DF with constant anisotropy beta Hernquist DF with Osipkov-Merritt anisotropy NFW DF with Osipkov-Merritt anisotropy Two-dimensional, axisymmetric disk distribution functions ---------------------------------------------------------- Distribution function for orbits in the plane of a galactic disk. General instance routines +++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 __call__ asymmetricdrift kurtosisvR kurtosisvT meanvR meanvT oortA oortB oortC oortK sigma2surfacemass sigma2 sigmaR2 sigmaT2 skewvR skewvT surfacemass surfacemassLOS targetSigma2 targetSurfacemass targetSurfacemassLOS vmomentsurfacemass Sampling routines ^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 2 sample sampledSurfacemassLOS sampleLOS sampleVRVT Specific distribution functions +++++++++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 Dehnen DF Schwarzschild DF Shu DF Two-dimensional, non-axisymmetric disk distribution functions -------------------------------------------------------------- Distribution function for orbits in the plane of a galactic disk in non-axisymmetric potentials. These are calculated using the technique of `Dehnen 2000 `_, where the DF at the current time is obtained as the evolution of an initially-axisymmetric DF at time ``to`` in the non-axisymmetric potential until the current time. General instance routines +++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 __call__ __init__ meanvR meanvT oortA oortB oortC oortK sigmaR2 sigmaRT sigmaT2 vertexdev vmomentsurfacemass Three-dimensional disk distribution functions ---------------------------------------------- Distribution functions for orbits in galactic disks, including the vertical motion for stars reaching large heights above the plane. Currently only the *quasi-isothermal DF*. General instance routines +++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 __call__ density estimate_hr estimate_hsr estimate_hsz estimate_hz jmomentdensity meanjr meanjz meanlz meanvR meanvT meanvz pvR pvRvT pvRvz pvT pvTvz pvz sampleV sampleV_interpolate sigmaR2 sigmaRz sigmaT2 sigmaz2 surfacemass_z tilt vmomentdensity Specific distribution functions +++++++++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 quasiisothermal DF The distribution function of a tidal stream --------------------------------------------- From `Bovy 2014 `_; see :ref:`stream-tutorial`. General instance routines +++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 __call__ __init__ calc_stream_lb callMarg density_par estimateTdisrupt find_closest_trackpoint find_closest_trackpointLB freqEigvalRatio gaussApprox length meanangledAngle meanOmega meantdAngle misalignment pangledAngle plotCompareTrackAAModel plotProgenitor plotTrack pOparapar ptdAngle sample sigangledAngle sigOmega sigtdAngle subhalo_encounters The distribution function of a gap in a tidal stream ---------------------------------------------------- From `Sanders, Bovy, & Erkal 2015 `_; see :ref:`streamgap-tutorial`. Implemented as a subclass of ``streamdf``. No full implementation is available currently, but the model can be set up and sampled as in the above paper. General instance routines +++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 __init__ sample Helper routines to compute kicks +++++++++++++++++++++++++++++++++ .. toctree:: :maxdepth: 2 impulse_deltav_plummer impulse_deltav_plummer_curvedstream impulse_deltav_hernquist impulse_deltav_hernquist_curvedstream impulse_deltav_general impulse_deltav_general_curvedstream impulse_deltav_general_orbitintegration impulse_deltav_general_fullplummerintegration