popsynth.distributions.spiral_galaxy_distribution module

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

Bases: SphericalDistribution

rho
a
b
R1
R0
__init__(seed: int = 1234, name: str = 'spiral_galaxy', form: Optional[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

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.