synthpop.star_generator

This file contains the StarGenerator, It generates stars based on the provided initial distributions, evolves them and applies the extinction.

Classes

StarGenerator

Star generator object which is used by a Population to generate its member stars.

Module Contents

class synthpop.star_generator.StarGenerator(imf_module, age_module, met_module, evolution_module, glbl_params, position, max_mass, logger)

Star generator object which is used by a Population to generate its member stars.

Attributes

imf_module age_module met_module evolution_module kinematics_at_end : bool

if true, wait until all stars are generated to calculate kinematics

chunk_sizeint

number of stars to generate per chunk to limit memory use

ref_bandstr

primary photometric filter for catalog

position max_mass : float

maximum allowed stellar mass

generator_name = 'StarGenerator'
imf_module
age_module
met_module
kinematics_at_the_end
chunk_size
ref_band
position
max_mass
logger
generate_stars(radii, missing_stars, mass_limit, do_kinematics, props)
generate_star_at_location(position, props, min_mass=None, max_mass=None)

generates stars at the given positions

get_evolved_props(m_init: numpy.ndarray, met: numpy.ndarray, age: numpy.ndarray, props: Set, **kwargs) Tuple[numpy.ndarray, Dict, numpy.ndarray]

evolve the stars using a list of evolution classes given by self.evolution each evolution class have a min and max mass range where it should be used. the used class are ranked by the order in the list.

Parameters

m_initndarray [Msun]

list of initial masses for all stars

metndarray [Fe/H]

list of metallicities for all stars

agendarray [Gyr]

list of ages for all stars

propsndarray

set of properties which should be interpolated

kwargs :

keywords passed to the evolutionary process

Returns

mag: ndarray

list of the main magnitude

s_track: dict

collection of ndarratys for each of the interpolated properties

inside_grid: ndarray

used to check if the the star is inside the isochrone grid