SersicSP

class artpop.source.SersicSP(sp, r_eff, n, theta, ellip, xy_dim, pixel_scale, num_r_eff=10, dx=0, dy=0, labels=None)[source]

Bases: Source

Stellar population with a Sersic spatial distribution.

Parameters
spStellarPopulation

A stellar population object.

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.

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

dxfloat, optional

Shift from center of image in the x direction.

dyfloat, optional

Shift from center of image in the y direction.

labelslist-like, optional

Labels for the stars. For example, EEP values (int or float) or name of evolutionary phase (str).

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)[source]

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.