synthesizer.galaxy

A factory function to return the correct galaxy type.

This function means the user doesn’t need to worry which galaxy they need to import. They only need to import the galaxy function, and pass the arguments they have to hand.

If Particles derived objects are passed a particle galaxy is initialised and returned. If a ParametricStars object is passed then a parametric galaxy is initialised and returned.

Example: from synthesizer import galaxy

# Get a particle galaxy gal = galaxy(stars=particle.Stars(…), gas=Gas(…), …)

OR

# Get a parametric galaxy gal = galaxy(stars=parametric.Stars(…), …)