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:

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:

  1. Find the nearest \(T_{\rm eff}\) from the library.

  2. Within that subset, find the nearest \(\log g\).

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

\[F_{\rm obs}(\lambda) = F_{\rm int}(\lambda) \cdot 10^{-0.4 \cdot E(B-V) \cdot k(\lambda)}\]

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:

\[\lambda_{\rm obs} = \lambda_{\rm rest} \cdot \left(1 + \frac{v_{\rm los}}{c} \right)\]

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.