MISTSersicSSP

class artpop.source.MISTSersicSSP(log_age, feh, phot_system, r_eff, n, theta, ellip, distance, xy_dim, pixel_scale, num_stars=None, total_mass=None, a_lam=0.0, add_remnants=True, mag_limit=None, mag_limit_band=None, imf='kroupa', imf_kw=None, mist_path='/home/docs/.artpop/mist', num_r_eff=10, mass_tolerance=0.01, dx=0, dy=0, label_type=None, random_state=None)[source]

Bases: SersicSP

MIST simple stellar population with a Sersic spatial distribution. This is a convenience class that combines sersic_xy and MISTSSP to make a Source object.

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

r_efffloat or Quantity

Effective radius of the source. If a float is given, the units are assumed to be kpc. Must be greater than zero.

nfloat

Sersic index. Must be greater than zero.

thetafloat or Quantity

Rotation angle, counterclockwise from the positive x-axis. If a float is given, the units are assumed to be degree.

ellipfloat

Ellipticity defined as 1 - b/a, where b is the semi-minor axis and a is the semi-major axis.

distancefloat or Quantity

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

xy_dimint or list-like

Dimensions of the mock image in xy coordinates. If int is given, will make the x and y dimensions the same.

pixel_scalefloat or Quantity

The pixel scale of the mock image. If a float is given, the units will be assumed to be arcsec / pixels. Default is 0.2 arcsec / pixel.

num_starsint or None

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

total_massfloat or None

Stellar mass of the source. If None, then must give num_stars. This mass accounts for stellar remnants, so the actual sampled mass will be less than the given value.

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.

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.

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, optional

The initial stellar mass function. Default is 'kroupa'.

imf_kwdict, optional

Optional keyword arguments for sampling the stellar mass function.

mist_pathstr, optional

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

num_r_efffloat, optional

Number of r_eff to sample positions within. This parameter is needed because the current Sersic sampling function samples from within a discrete grid. Default is 10.

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.

dxfloat, optional

Shift from center of image in the x direction.

dyfloat, optional

Shift from center of image in the y direction.

label_typestr, optional

If not None, the type of labels to pass to the Source object. Can be phases or an attribute of MISTSSP.

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

num_stars

Number of stars in source

x

x coordinates

y

y coordinates

Methods Summary

copy()

Create deep copy of source object.

mag_to_image_amplitude(m_tot, zpt)

Convert total magnitude into amplitude parameter for the smooth model.

select_stars(label)

Return boolean mask that is set to True for stars of given label.

Attributes Documentation

num_stars

Number of stars in source

x

x coordinates

y

y coordinates

Methods Documentation

copy()

Create deep copy of source object.

mag_to_image_amplitude(m_tot, zpt)

Convert total magnitude into amplitude parameter for the smooth model.

Parameters
m_totfloat

Total magnitude in the smooth component of the system.

zptfloat

Photometric zero point.

Returns
mu_efloat

Surface brightness at the effective radius of the Sersic distribution in mags per square arcsec.

amplitudefloat

Amplitude parameter for the smooth model in image flux units.

param_namestr

Name of amplitude parameter (needed to set its value when generating the smooth model).

select_stars(label)

Return boolean mask that is set to True for stars of given label.