Star Class

template<IsSpectral TSpectral>
class Star

Public Functions

Star() = default
Star(const Vec3<double> &direction, TSpectral irradiance)
Star(const StarData &star_data, Time time)

Constructs a Star from catalog data, applying proper motion correction.

Computes the star’s unit direction vector in the ICRS frame by applying proper motion corrections to the catalog position. The proper motion is extrapolated from the catalog epoch (J2000.0) to the specified observation time.

Note

The proper motion in RA from catalogs like Tycho-2 is typically given as pmRA*cos(DEC) to account for convergence of meridians toward the poles. This implementation divides by cos(DEC) to recover the true angular displacement in right ascension.

Template Parameters:

TSpectral – A type satisfying the IsSpectral concept, representing the star’s spectral characteristics.

Parameters:
  • star_data – Catalog data for the star. Assumes:

    • RA and DEC are in radians (ICRS, epoch J2000.0)

    • pmRA is proper motion in RA*cos(DEC), in radians/year

    • pmDEC is proper motion in DEC, in radians/year

  • time – The observation time at which to compute the star’s position.

Star(const StarData &star_data, double years_since_j2000)
inline Vec3<double> get_direction() const
inline TSpectral get_irradiance() const