synthpop.modules.evolution
Submodules
Attributes
Classes
The EvolutionIsochrones base class. The appropriate subclass is |
|
The EvolutionInterpolator base class. The appropriate subclass is |
Functions
|
This function combines the isochrones and Interpolator into a common Evolution Class |
Package Contents
- class synthpop.modules.evolution.EvolutionIsochrones(columns=None, logger: types.ModuleType = None, **kwargs)
Bases:
abc.ABCThe 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_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.EvolutionInterpolator(logger: types.ModuleType = None, **kwargs)
Bases:
abc.ABCThe 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.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
- synthpop.modules.evolution.ISOCHRONES_DIR = "b'.'/data/isochrones"
- synthpop.modules.evolution.EVOLUTION_DIR
- synthpop.modules.evolution.MUST_HAVE_COLUMNS = ['log10_isochrone_age_yr', 'initial_mass', '[Fe/H]_init', 'phase']