skyscapes.scene.star
====================

.. py:module:: skyscapes.scene.star

.. autoapi-nested-parse::

   Star models for the scene hierarchy.

   ``AbstractStar`` declares a ``Ms_kg`` / ``dist_pc`` pair and the
   ``spec_flux_density`` hook. ``FlatStar`` is a flat-spectrum stand-in
   useful for ETC runs. ``Star`` wraps an ``interpax.Interpolator2D``
   over (wavelength, time) built from Jansky flux data, matching the legacy
   ``skyscapes._legacy.Star`` semantics.

   Note: ``from __future__ import annotations`` is deliberately NOT used
   here -- it stringifies annotations, which breaks Equinox's metaclass
   handling of ``AbstractVar`` type parameters.



Classes
-------

.. autoapisummary::

   skyscapes.scene.star.AbstractStar
   skyscapes.scene.star.FlatStar
   skyscapes.scene.star.Star


Module Contents
---------------

.. py:class:: AbstractStar

   Bases: :py:obj:`equinox.Module`


   Abstract stellar source.

   Attributes:
       Ms_kg: Stellar mass in kilograms.
       dist_pc: Distance to the star in parsecs.


   .. py:attribute:: Ms_kg
      :type:  equinox.AbstractVar[float]


   .. py:attribute:: dist_pc
      :type:  equinox.AbstractVar[float]


   .. py:method:: spec_flux_density(wavelength_nm, time_jd)
      :abstractmethod:


      Return spectral flux density in ph/s/m^2/nm.



.. py:class:: FlatStar

   Bases: :py:obj:`AbstractStar`


   Flat-spectrum star -- constant flux independent of wavelength or time.


   .. py:attribute:: Ms_kg
      :type:  float


   .. py:attribute:: dist_pc
      :type:  float


   .. py:attribute:: flux_phot_per_nm_m2
      :type:  float


   .. py:method:: spec_flux_density(wavelength_nm, time_jd)

      Constant flux, broadcast to wavelength_nm's shape.

      ``time_jd`` is part of the AbstractStar interface but ignored here.



   .. py:method:: __repr__()

      Compact one-line summary of mass, distance, and flux.



.. py:class:: Star(*, Ms_kg, dist_pc, wavelengths_nm, times_jd, flux_density_jy, ra_deg = 0.0, dec_deg = 0.0, diameter_arcsec = 0.0, luminosity_lsun = 1.0)

   Bases: :py:obj:`AbstractStar`


   Time- and wavelength-dependent star backed by an interpax 2D spline.


   .. py:attribute:: Ms_kg
      :type:  float


   .. py:attribute:: dist_pc
      :type:  float


   .. py:attribute:: ra_deg
      :type:  float


   .. py:attribute:: dec_deg
      :type:  float


   .. py:attribute:: diameter_arcsec
      :type:  float


   .. py:attribute:: luminosity_lsun
      :type:  float


   .. py:attribute:: _wavelengths_nm
      :type:  jaxtyping.Array


   .. py:attribute:: _times_jd
      :type:  jaxtyping.Array


   .. py:attribute:: _flux_density_phot
      :type:  jaxtyping.Array


   .. py:attribute:: _flux_interp
      :type:  interpax.Interpolator2D


   .. py:method:: spec_flux_density(wavelength_nm, time_jd)

      Scalar or array spectral flux density [ph/s/m^2/nm].



   .. py:method:: __repr__()

      One-line summary of metadata + wavelength/time grid extent.



