MISTIsochrone¶
- class artpop.stars.MISTIsochrone(log_age, feh, phot_system, mist_path='/home/docs/.artpop/mist', ab_or_vega='ab', v_over_vcrit=0.4)[source]¶
Bases:
Isochrone
Class for fetching and storing MIST isochrones. It also has several methods for calculating IMF-weighted photometric properties of a stellar population with the given age an metallicity.
Note
Currently, the models are interpolated in metallicity but not in age. Ages are therefore limited to the age grid of the MIST models. The [Fe/H] and log(Age/yr) grids are stored as the private class attributes
_feh_grid
and_log_age_grid
.- Parameters
- log_agefloat
Logarithm base 10 of the simple stellar population age in years.
- fehfloat
Metallicity [Fe/H] of the simple stellar population.
- phot_systemstr or list-like
Name of the photometric system(s).
- mist_pathstr, optional
Path to MIST isochrone grids. Use this if you want to use a different path from the
MIST_PATH
environment variable.- ab_or_vegastr, optional
Magnitudes will be in the AB (default) or Vega magnitude system.
- v_over_vcritfloat, optional
Rotation rate divided by the critical surface linear velocity. Current options are 0.4 (default) and 0.0.
Attributes Summary
List of filters in the given photometric system(s).
MIST entire isochrone in a structured
ndarray
.The maximum mass of the isochrone.
The minimum mass of the isochrone.
Methods Summary
calculate_mag_limit
(imf, bandpass[, ...])Calculate the limiting faint magnitude to sample a given fraction of mass or number of a stellar population.
from_parsec
(fn, **kwargs)Read isochrone generated from the PARSEC website.
imf_weights
(imf[, m_min_norm, m_max_norm, ...])Calculate IMF weights.
interpolate
(y_name, x_interp[, x_name, ...])Interpolate isochrone.
mag_to_mass
(mag, bandpass)Interpolate isochrone to calculate initial stellar masses that have the given magnitude.
nearest_mini
(m)Find the nearest mass to
m
in the initial mass array.ssp_color
(blue, red[, imf])Calculate IMF-weighted integrated color.
ssp_mag
(bandpass[, imf, norm_type])Calculate IMF-weighted magnitude.
ssp_mean_star_mass
(imf)Calculate IMF-weighted mean stellar mass, where the IMF is normalized by number to one star formed.
ssp_sbf_mag
(bandpass[, imf])Calculate IMF-weighted SBF magnitude.
ssp_surviving_mass
(imf[, m_min, m_max, ...])Calculate IMF-weighted mass normalized such that 1 solar mass is formed by the age of the population.
Attributes Documentation
- filters¶
List of filters in the given photometric system(s).
- m_max¶
The maximum mass of the isochrone.
- m_min¶
The minimum mass of the isochrone.
Methods Documentation
- calculate_mag_limit(imf, bandpass, frac_mass_sampled=None, frac_num_sampled=None, distance=<Quantity 10. pc>)¶
Calculate the limiting faint magnitude to sample a given fraction of mass or number of a stellar population. This is used for when you only what to sample stars that are brighter than a magnitude limit. You must specify either
frac_mass_sampled
orfrac_num_sampled
.Note
You must give
frac_mass_sampled
orfrac_num_sampled
.- Parameters
- imfstr or dict
Which IMF to use, if str then must be one of pre-defined: ‘kroupa’, ‘scalo’ or ‘salpeter’. Can also specify custom (broken) power law as dict, which must contain either ‘a’ as a Float (describing the slope of a single power law) or ‘a’ (a list with 3 elements describing the slopes of a broken power law) and ‘b’ (a list with 2 elements describing the locations of the breaks).
- bandpassstr
Observation bandpass of the limiting magnitude.
- frac_mass_sampled: float, optional
Fraction of mass that will be sampled if only stars that are brighter than the magnitude limit are sampled.
- frac_num_sampled: float, optional
Fraction of stars by number that will be sampled if only stars that are brighter than the magnitude limit are sampled.
- distancefloat or
Quantity
, optional Distance to source. If float is given, the units are assumed to be
Mpc
. Default distance is 10pc
(i.e., the mags are in absolute units).
- Returns
- mag_limitfloat
The desired limiting magnitude.
- mass_limitfloat
Mass of stars (in solar masses) that have the limiting magnitude.
- static from_parsec(fn, **kwargs)[source]¶
Read isochrone generated from the PARSEC website. If more than one age and/or metallicity is included in the file, you must provide the log_age and/or zini parameters.
- Parameters
- file_namestr
Isochrone file name.
- log_agefloat, optional
Log of age in years. You must provided this parameter if there is more than one age in the isochrone file. Note this function does not interpolate ages, so it must be included in the file.
- zinifloat, optional
Initial metal fraction. You must provided this parameter if there is more than one metallicity in the isochrone file. Note this function does not interpolate metallicity, so it must be included in the file.
- num_filtersint, optional
Number of filters included in the isochrone file. If None, will assume the last non-filter parameter is
mbolmag
.
- Returns
- iso
artpop.stars.Isochrone
PARSEC Isochrone object.
- iso
- imf_weights(imf, m_min_norm=None, m_max_norm=None, norm_type='mass', **kwargs)¶
Calculate IMF weights.
- Parameters
- imfstr or dict
Which IMF to use, if str then must be one of pre-defined: ‘kroupa’, ‘scalo’ or ‘salpeter’. Can also specify custom (broken) power law as dict, which must contain either ‘a’ as a Float (describing the slope of a single power law) or ‘a’ (a list with 3 elements describing the slopes of a broken power law) and ‘b’ (a list with 2 elements describing the locations of the breaks). of the breaks.
- m_min_normNone or float, optional
Minimum mass for the normalization. Must be less than or equal to the mini mass of isochrone, which will be used if None is given.
- m_max_normfloat, optional
Maximum mass for normalization.
- norm_typestr, optional
Type of IMF normalization (mass or number).
- Returns
- wght
ndarray
IMF weights calculated such that an integral over mass is simply given by SUM(m * wght).
- wght
- interpolate(y_name, x_interp, x_name='mini', slice_interp=slice(None, None, None), **kwargs)¶
Interpolate isochrone.
- mag_to_mass(mag, bandpass)¶
Interpolate isochrone to calculate initial stellar masses that have the given magnitude. Since more than one mass can have the same magnitude (from stars being in different phases of stellar evolution), we step through each isochrone and check if the given magnitude falls between two bins, in which case we interpolate the associated mass.
- Parameters
- magfloat
Magnitude to be converted in to stellar mass(es).
- bandpassstr
Photometric bandpass of the
mag
.
- Returns
- mass_interp
ndarray
Interpolated mass(es) associated with
mag
.
- mass_interp
- nearest_mini(m)¶
Find the nearest mass to
m
in the initial mass array.- Parameters
- mfloat:
The mass for which we want the nearest initial mass.
- Returns
- m_nearestfloat
Value of the nearest mass.
- arg_nearestint
Argument of the nearest mass.
- ssp_color(blue, red, imf='kroupa', **kwargs)¶
Calculate IMF-weighted integrated color.
- Parameters
- bluestr
Blue bandpass.
- redstr
Red bandpass.
- imfstr or dict
Which IMF to use, if str then must be one of pre-defined: ‘kroupa’, ‘scalo’ or ‘salpeter’. Can also specify custom (broken) power law as dict, which must contain either ‘a’ as a Float (describing the slope of a single power law) or ‘a’ (a list with 3 elements describing the slopes of a broken power law) and ‘b’ (a list with 2 elements describing the locations of the breaks).
- Returns
- colorfloat
Integrated color of stellar population.
- ssp_mag(bandpass, imf='kroupa', norm_type='mass', **kwargs)¶
Calculate IMF-weighted magnitude.
- Parameters
- bandpassstr
Bandpass to of mean mag.
- imfstr or dict
Which IMF to use, if str then must be one of pre-defined: ‘kroupa’, ‘scalo’ or ‘salpeter’. Can also specify custom (broken) power law as dict, which must contain either ‘a’ as a Float (describing the slope of a single power law) or ‘a’ (a list with 3 elements describing the slopes of a broken power law) and ‘b’ (a list with 2 elements describing the locations of the breaks).
- norm_typestr, optional
Normalization type (mass or number)
- Returns
- mfloat
Integrated magnitude of stellar population.
- ssp_mean_star_mass(imf)¶
Calculate IMF-weighted mean stellar mass, where the IMF is normalized by number to one star formed. The mean stellar mass is equivalent to dividing a large of samples (distributed according to the IMF) by the number of stars.
- Parameters
- imfstr or dict
Which IMF to use, if str then must be one of pre-defined: ‘kroupa’, ‘scalo’ or ‘salpeter’. Can also specify custom (broken) power law as dict, which must contain either ‘a’ as a Float (describing the slope of a single power law) or ‘a’ (a list with 3 elements describing the slopes of a broken power law) and ‘b’ (a list with 2 elements describing the locations of the breaks).
- Returns
- ——-
- mean_massfloat
The mean stellar mass.
- ssp_sbf_mag(bandpass, imf='kroupa', **kwargs)¶
Calculate IMF-weighted SBF magnitude.
- Parameters
- bandpassstr
Bandpass to of SBF mag.
- imfstr or dict
Which IMF to use, if str then must be one of pre-defined: ‘kroupa’, ‘scalo’ or ‘salpeter’. Can also specify custom (broken) power law as dict, which must contain either ‘a’ as a Float (describing the slope of a single power law) or ‘a’ (a list with 3 elements describing the slopes of a broken power law) and ‘b’ (a list with 2 elements describing the locations of the breaks).
- Returns
- sbffloat
SBF magnitude of stellar population.
- ssp_surviving_mass(imf, m_min=None, m_max=120, add_remnants=True, mlim_bh=40.0, mlim_ns=8.5)¶
Calculate IMF-weighted mass normalized such that 1 solar mass is formed by the age of the population.
The initial-mass-dependent remnant formulae are taken from Renzini & Ciotti 1993.
- Parameters
- imfstr or dict
Which IMF to use, if str then must be one of pre-defined: ‘kroupa’, ‘scalo’ or ‘salpeter’. Can also specify custom (broken) power law as dict, which must contain either ‘a’ as a Float (describing the slope of a single power law) or ‘a’ (a list with 3 elements describing the slopes of a broken power law) and ‘b’ (a list with 2 elements describing the locations of the breaks).
- add_remnantsbool
If True, add stellar remnants to surviving mass.
- Returns
- massfloat
Total surviving mass.