popsynth.distributions.spiral_galaxy_distribution module

class popsynth.distributions.spiral_galaxy_distribution.SpiralGalaxyDistribution(seed: int = 1234, name: str = 'spiral_galaxy', form: str = None)[source]

Bases: popsynth.distributions.spherical_distribution.SphericalDistribution

R0
R1
__init__(seed: int = 1234, name: str = 'spiral_galaxy', form: str = None)[source]

A spiral galaxy spatial distribution.

Parameters:
  • seed (int) – Random seed
  • name (str) – Name of the distribution
  • form (str) – Mathematical description of distribution
  • rho (DistributionParameter) – Local density
  • a (DistributionParameter) – Shape parameter
  • b (DistributionParameter) – Shape parameter
  • R1 (DistributionParameter) – Scale parameter
  • R0 (DistributionParameter) – Scale parameter
a
b
dNdV(r)[source]

The differential number of objects per volume element

Parameters:distance
Returns:
draw_sky_positions(size)[source]

Based on Wainscoat 1992 and Faucher-Giguere 2007.

Code thanks to Mortiz Pleintinger.

rho