build_galaxy

artpop.stars.build_galaxy(stellar_mass, num_stars_iter=100000.0, **kwargs)[source]

Build galaxy of a given stellar mass.

Parameters
stellar_massfloat or Quantity

Stellar mass of galaxy. If float is given, the units are assumed to be solar masses.

num_stars_iterint

Number of stars to generate at each iteration. Lower this number (at the expense of speed) to get a more accurate total mass.

Returns
starsndarray

Stellar masses of all the stars.