fastar.SemiresolvedSSPSynthesizer#
- class fastar.SemiresolvedSSPSynthesizer(model_label=None, imf_function=None)[source]#
Bases:
BaseSSPSynthesizerClass for generating synthetic semi-resolved stellar populations spectroscopic and photometric predictions with a PCA-based stellar spectral model and a stochastic IMF sampling.
- __init__(model_label=None, imf_function=None)#
Methods
__init__([model_label, imf_function])predict_spectrum(logg, teff, fmet)Predict stellar spectra given logg, Teff, and [Fe/H] using the PCA regressor.
synthesize(age, met, num_stars, key[, ...])Generate synthetic semi-resolved population spectrum for a given age and metallicity.
synthesize_large(age, met, num_stars, key[, ...])- synthesize(age, met, num_stars, key, imf_params=None, out_masses=False)[source]#
Generate synthetic semi-resolved population spectrum for a given age and metallicity.
- Parameters:
age (float) – Stellar population age (in Gyr).
met (float) – Metallicity [M/H].
num_stars (int) – Number of stars to sample.
key (PRNGKey) – Random key for JAX sampling.
imf_params (dict, optional) – Parameters for the initial mass function.
out_masses (bool, optional) – If True, return array of sampled stellar masses instead of the total mass. Default is False.
- Returns:
(spectrum, total stellar mass) or (spectrum, sampled stellar masses) depending on out_masses.
- Return type: