synthpop.star_generator ======================= .. py:module:: synthpop.star_generator .. autoapi-nested-parse:: This file contains the StarGenerator, It generates stars based on the provided initial distributions, evolves them and applies the extinction. Classes ------- .. autoapisummary:: synthpop.star_generator.StarGenerator Module Contents --------------- .. py:class:: 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_size : int number of stars to generate per chunk to limit memory use ref_band : str primary photometric filter for catalog position max_mass : float maximum allowed stellar mass .. py:attribute:: generator_name :value: 'StarGenerator' .. py:attribute:: imf_module .. py:attribute:: age_module .. py:attribute:: met_module .. py:attribute:: kinematics_at_the_end .. py:attribute:: chunk_size .. py:attribute:: ref_band .. py:attribute:: position .. py:attribute:: max_mass .. py:attribute:: logger .. py:method:: generate_stars(radii, missing_stars, mass_limit, do_kinematics, props) .. py:method:: generate_star_at_location(position, props, min_mass=None, max_mass=None) generates stars at the given positions .. py:method:: 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_init : ndarray [Msun] list of initial masses for all stars met : ndarray [Fe/H] list of metallicities for all stars age : ndarray [Gyr] list of ages for all stars props : ndarray 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