synthpop.modules.evolution._evolution

This is a module containing the base classes for the evolution process.

The Evolution class is split into a EvolutionIsochrones and EvolutionInterpolator. This allows to vary both independently. Those are combined into a common Evolution Class using the CombineEvolution function

A EvolutionIsochrones subclass should also have an EvolutionInterpolator as second Parent to specify a default interpolator. This interpolator is used whenever no Interpolator is defined.

Attributes

ISOCHRONES_DIR

EVOLUTION_DIR

MUST_HAVE_COLUMNS

Classes

EvolutionIsochrones

The EvolutionIsochrones base class. The appropriate subclass is

EvolutionInterpolator

The EvolutionInterpolator base class. The appropriate subclass is

Functions

CombineEvolution([Isochrones, Interpolator])

This function combines the isochrones and Interpolator into a common Evolution Class

Module Contents

synthpop.modules.evolution._evolution.ISOCHRONES_DIR = "b'.'/data/isochrones"
synthpop.modules.evolution._evolution.EVOLUTION_DIR
synthpop.modules.evolution._evolution.MUST_HAVE_COLUMNS = ['log10_isochrone_age_yr', 'initial_mass', '[Fe/H]_init', 'phase']
class synthpop.modules.evolution._evolution.EvolutionIsochrones(columns=None, logger: types.ModuleType = None, **kwargs)

Bases: abc.ABC

The EvolutionIsochrones base class. The appropriate subclass is assigned based on Population[evolution_class][name] through the “get_subclass” factory. must specify at least this “log10_isochrone_age_yr”, “initial_mass”, “[Fe/H]_init”, “star_mass”

Current included subclasses:

-MIST’: Using the MIST isochrones systems,

Attributes

isochronesPandas DataFrame

DataFrame of the loaded isochrones

isochrones_groupedPandas DataFrameGroupBy

Isochrones groupend in metallicity and age

more Attributes can be specified in the subclasses

Methods

__init__(self,**kwargs)None

initialize the EvolutionIsochrones class from a Population dictionary

get_isochrones(self)None

return the Isochrones Data Frame

isochrones_name = None
isochrones_grouped = None
columns = None
logger = None
get_isochrones()

Returns

isochronesPandas.DataFrame

Isochrone Grid

get_mass_min(band: str, magnitude_limit: float, distances: np.ndarray or float, max_age: float = None, extinction_at_slice_front: np.ndarray or float = None) numpy.ndarray

gets the minimum mass of stars still passing the magnitude_limit

Parameters

magnitude_limitfloat

maximum observed magnitude, (set distance to 0.01 if absolute magnitudes),

distancesnp.ndarray or float

distances in kpc

max_age: float [Gyr] Returns ——- min_mass : np.ndarray or float Returns minimum mass for stars brighter than magnitude_limit

class synthpop.modules.evolution._evolution.EvolutionInterpolator(logger: types.ModuleType = None, **kwargs)

Bases: abc.ABC

The EvolutionInterpolator base class. The appropriate subclass is assigned based on Population[evolution_class][Interpolator] through the “get_subclass” factory. Each EvolutionIsochrone Class should have a specified default Interpolator

Current included subclasses:

-LagrangeInterpolator: Using Lagrange Polynomials to interpolate

between Consecutive stars in the Isochrone grid

Attributes

accept_np_arraysBool

should be set to True if the interpolator can work with multiple stars given as array.

more Attributes can be specified in the subclasses

Methods

__init__(self,**kwargs)None

initialize the EvolutionIsochrones class from a Population dictionary

get_evolved_props(self)pandas.DataFrame

return the Isochrones

interpolator_name = None
accept_np_arrays = False
isochrones = None
met_to_file_iso = None
file_met = None
iso_ages = None
logger = None
abstract get_evolved_props(m_init, met, age, props, **kwargs)

Get the interpolated properties from the isochrones.

Parameters

m_initfloat, ndarray [Msun]

initial mass for the stars

metfloat, ndarray [dex]

initial metallicity for the stars

agefloat, ndarray [Gyr]

initial age for the stars

propsset

a set of properties

kwargsdict, optional

further ignored keywords

Returns

s_trackdict

interpolator properties for all keywords specified in props

in_gridbool , ndarray

indicator if the star is within the Isochrone Grid

final_phasebool, ndarray

indicator if the star is in its final phase and might need special treatment. (can be the same as in_grid)

Note: if accept_np_arrays is set to True.

each entry in s_track has to be a ndarray of the same shape as the input parameters

synthpop.modules.evolution._evolution.CombineEvolution(Isochrones=None, Interpolator=None)

This function combines the isochrones and Interpolator into a common Evolution Class Parameters ———- Isochrones : class

Class of the Isochrone system

Interpolatorclass or None

Class of the Interpolator

Returns

Evolution: class