Single Star Spectrum¶
In the current version, the spectrum of a single star is modeled using the spec1d.SingleStar class, which relies on template libraries managed by the SingleStarTemplate class.
Overview¶
Two stellar template libraries are supported:
XSL: Empirical stellar spectra from the X-shooter Spectral Library (XSL), observed with VLT/X-shooter (Verro et al. 2022).Munari2005: Synthetic spectra from Munari et al. (2005), adopting a constant instrumental resolution of 1 Å.
Each template is characterized by the stellar atmospheric parameters:
Effective temperature \(T_{\rm eff}\) [K],
Surface gravity \(\log g\) [cm/s²],
Metallicity \([{\rm Fe/H}]\) [dex].
Template Selection¶
The stellar template that best matches the input parameters is selected through the following steps:
Find the nearest \(T_{\rm eff}\) from the library.
Within that subset, find the nearest \(\log g\).
Within that subset, find the nearest \([{\rm Fe/H}]\).
The selected template is normalized by its mean value.
Spectral Broadening¶
The intrinsic resolution of each library is taken into account:
XSL: wavelength-dependent instrumental resolution with \(R \sim 10000\),Munari2005: constant resolution of 1 Å across the full wavelength range.
These are converted to wavelength-dependent LSF and stored as a vector. When needed, Gaussian convolution is applied to match target velocity dispersion.
Dust Attenuation¶
Internal extinction is applied using the attenuation law of Calzetti et al. (2000):
where \(E(B-V)\) is the user input ebv, and \(k(\lambda)\) is the attenuation curve.
Redshift and Doppler Shift¶
The observed wavelength is computed using the stellar line-of-sight velocity vel, including relativistic correction:
This ensures accurate transformation even for high-velocity stars.
Flux Calibration¶
The final flux is scaled to match the specified apparent SDSS-\(r\) band magnitude (mag). The calibration uses the filter curve SLOAN_SDSS.r, and the final output is expressed in \(10^{-17}\ \mathrm{erg\ s^{-1}\ cm^{-2}\ \mathring{A}^{-1}}\).
Output¶
The final 1D spectrum includes:
Stellar template matched by \(T_{\rm eff}\), \(\log g\), and \([{\rm Fe/H}]\),
Gaussian spectral broadening (if needed),
Internal dust extinction,
Relativistic Doppler redshift from line-of-sight velocity,
Magnitude-based flux calibration.
This class is useful for simulating isolated stars or star clusters.