UniformSSP¶
- class artpop.source.UniformSSP(isochrone, distance, xy_dim, pixel_scale, sb, sb_band, a_lam=0.0, mag_limit=None, mag_limit_band=None, imf='kroupa', imf_kw=None, label_type=None, random_state=None)[source]¶
Bases:
Source
Simple stellar population with a uniform spatial distribution.
- Parameters
- isochrone
Isochrone
Isochrone object.
- 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.
- sbfloat
Surface brightness of of uniform stellar distribution.
- sb_bandstr
Photometric filter of
sb
. Must be part ofphot_system
.- 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.- pixel_scalefloat or
Quantity
, optional The pixel scale of the mock image. If a float is given, the units will be assumed to be
arcsec / pixels
. Default is0.2 arcsec / pixel
.- imfstr, optional
The initial stellar mass function. Default is
'kroupa'
.- imf_kwdict, optional
Optional keyword arguments for sampling the stellar mass function.
- ssp_kwdict, optional
Additional keyword arguments for
SSP
.- label_typestr, optional
If not None, the type of labels to pass to the
Source
object. Must be an attribute ofSSP
.- random_state
None
, int, list of ints, orRandomState
If
None
, return theRandomState
singleton used bynumpy.random
. Ifint
, return a newRandomState
instance seeded with theint
. IfRandomState
, return it. Otherwise raiseValueError
.
- isochrone
Attributes Summary
Number of stars in source
x coordinates
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
- mufloat
Constant surface brightness 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.