MISTSSP

class artpop.stars.MISTSSP(log_age, feh, phot_system, num_stars=None, total_mass=None, distance=<Quantity 10. pc>, a_lam=0.0, mag_limit=None, mag_limit_band=None, imf='kroupa', mist_path='/home/docs/.artpop/mist', imf_kw=None, mass_tolerance=0.05, add_remnants=True, random_state=None, **kwargs)[source]

Bases: SSP

MIST Simple Stellar Population.

Note

You must give total_mass or num_stars.

Parameters
log_agefloat

Log (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).

num_starsint or None

Number of stars in source. If None, then must give total_mass.

total_massfloat or Quantity or None

Stellar mass of the source. If None, then must give num_stars. This mass accounts for stellar remnants when add_remnants = True, which means the actual sampled mass will be less than the given value. If float is given, the units are assumed to be solar masses.

distancefloat or Quantity, optional

Distance to source. If float is given, the units are assumed to be Mpc. Default distance is 10 pc.

a_lamfloat or dict, optional

Magnitude(s) of extinction. If float, the same extinction will be applied to all bands. If dict, the keys must be the same as the observational filters.

mag_limitfloat, optional

Only sample individual stars that are brighter than this magnitude. All fainter stars will be combined into an integrated component. Otherwise, all stars in the population will be sampled. You must also give the mag_limit_band if you use this parameter.

mag_limit_bandstr, optional

Bandpass of the limiting magnitude. You must give this parameter if you use the mag_limit parameter.

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).

mist_pathstr, optional

Path to MIST isochrone grids. Use this if you want to use a different path from the MIST_PATH environment variable.

imf_kwdict, optional

Optional keyword arguments for sampling the stellar mass function.

mass_tolerancefloat, optional

Tolerance in the fractional difference between the input mass and the final mass of the population. The parameter is only used when total_mass is given.

add_remnantsbool, optional

If True (default), apply scaling factor to total mass to account for stellar remnants in the form of white dwarfs, neutron stars, and black holes.

random_stateNone, int, list of ints, or RandomState

If None, return the RandomState singleton used by numpy.random. If int, return a new RandomState instance seeded with the int. If RandomState, return it. Otherwise raise ValueError.

Attributes Summary

a_lam

Return extinction dictionary.

abs_mag_table

Absolute magnitudes in a Table object.

dist_mod

The distance modulus.

mag_table

Apparent magnitudes in a Table object.

num_pops

The number of simple stellar populations that composes this pop.

num_stars

Number stars in population.

phases

total_initial_live_mass

Total initial stellar mass in solar units.

Methods Summary

build_pop([num_stars, total_mass, ...])

Build the stellar population.

copy()

from_pickle(file_name)

Load pickle of stellar population object.

get_star_phases()

Returns the stellar phases (as defined by the MIST EEPs).

integrated_color(blue, red[, select])

Calculate the population's integrated color.

mag_integrated_component(bandpass)

Get the magnitude of the integrated component of the population if it exists.

mean_mag(bandpass[, select])

Calculate the population's mean magnitude.

sample_fraction(mag_limit, mag_limit_band)

Calculate the fraction of stars by mass and number that will be sampled with the give limiting magnitude.

sbf_mag(bandpass)

Calculate the apparent SBF magnitude of the stellar population.

select_phase(phase)

Generate stellar evolutionary phase mask.

set_distance(distance)

Change the distance to the stellar population.

star_mags(bandpass[, select])

Get the stellar apparent magnitudes.

to_pickle(file_name)

Pickle stellar population object.

total_mag(bandpass[, select])

Calculate the population's total magnitude.

Attributes Documentation

a_lam

Return extinction dictionary.

abs_mag_table

Absolute magnitudes in a Table object.

dist_mod

The distance modulus.

mag_table

Apparent magnitudes in a Table object.

num_pops

The number of simple stellar populations that composes this pop.

num_stars

Number stars in population.

phases = ['PMS', 'MS', 'giants', 'RGB', 'CHeB', 'AGB', 'EAGB', 'TPAGB', 'postAGB', 'WDCS']
total_initial_live_mass

Total initial stellar mass in solar units.

Methods Documentation

build_pop(num_stars=None, total_mass=None, mass_tolerance=0.01, add_remnants=True)

Build the stellar population. You must give total_mass or num_stars as an argument.

Parameters
num_starsint or None

Number of stars in source. If None, then must give total_mass.

total_massfloat or Quantity or None

Stellar mass of the source. If None, then must give num_stars. This mass accounts for stellar remnants when add_remnants = True which means the actual sampled mass will be less than the given value. If float is given, the units are assumed to be solar masses.

mass_tolerancefloat, optional

Tolerance in the fractional difference between the input mass and the final mass of the population. The parameter is only used when total_mass is given.

add_remnantsbool, optional

If True (default), apply scaling factor to total mass to account for stellar remnants in the form of white dwarfs, neutron stars, and black holes.

copy()
static from_pickle(file_name)

Load pickle of stellar population object.

get_star_phases()[source]

Returns the stellar phases (as defined by the MIST EEPs).

integrated_color(blue, red, select=None)

Calculate the population’s integrated color.

Parameters
bluestr

The blue bandpass. Must be a filter in the given photometric system(s).

redstr

The red bandpass. Must be a filter in the given photometric system(s).

selectndarray, optional

Boolean mask for selecting stars (True for stars to include).

Returns
colorfloat

The integrated color.

mag_integrated_component(bandpass)

Get the magnitude of the integrated component of the population if it exists.

Parameters
bandpassstr

Filter of observation. Must be a filter in the given photometric system(s).

Returns
magfloat

The integrated magnitude if it exists. Otherwise None is returned.

mean_mag(bandpass, select=None)

Calculate the population’s mean magnitude.

Parameters
bandpassstr

Filter of observation. Must be a filter in the given photometric system(s).

selectndarray, optional

Boolean mask for selecting stars (True for stars to include).

Returns
magfloat

The mean magnitude in the given bandpass.

sample_fraction(mag_limit, mag_limit_band)

Calculate the fraction of stars by mass and number that will be sampled with the give limiting magnitude.

Parameters
mag_limitfloat, optional

Only sample individual stars that are brighter than this magnitude.

mag_limit_bandstr, optional

Bandpass of the limiting magnitude.

Returns
m_limfloat

Initial stellar mass associated with mag_limit.

f_num_sampledfloat

Fraction of stars that will be sampled by number.

f_mass_sampledfloat

Fraction of stars that will be sampled by mass.

sbf_mag(bandpass)

Calculate the apparent SBF magnitude of the stellar population.

Parameters
bandpassstr

Filter of observation. Must be a filter in the given photometric system(s).

Returns
mbarfloat

The apparent SBF magnitude of the stellar population in the given bandpass.

select_phase(phase)[source]

Generate stellar evolutionary phase mask. The mask will be True for sources that are in the give phase according to the MIST EEPs.

Parameters
phasestr

Evolutionary phase to select. Options are ‘all’, ‘MS’, ‘giants’, ‘RGB’, ‘CHeB’, ‘AGB’, ‘EAGB’, ‘TPAGB’, ‘postAGB’, or ‘WDCS’.

Returns
maskndarray

Mask that is True for stars in input phase and False otherwise.

Notes

The MIST EEP phases were taken from Table II: Primary Equivalent Evolutionary Points (EEPs): http://waps.cfa.harvard.edu/MIST/README_tables.pdf

set_distance(distance)

Change the distance to the stellar population.

Parameters
distancefloat or Quantity

Distance to source. If float is given, the units are assumed to be Mpc.

star_mags(bandpass, select=None)

Get the stellar apparent magnitudes.

Parameters
bandpassstr

Filter of observation. Must be a filter in the given photometric system(s).

selectndarray, optional

Boolean mask for selecting stars (True for stars to include).

Returns
magsndarray

The stellar apparent magnitudes in the given bandpass.

to_pickle(file_name)

Pickle stellar population object.

total_mag(bandpass, select=None)

Calculate the population’s total magnitude.

Parameters
bandpassstr

Filter of observation. Must be a filter in the given photometric system(s).

selectndarray, optional

Boolean mask for selecting stars (True for stars to include).

Returns
magfloat

The total magnitude in the given bandpass.