pytmosph3r.planetary_system.star.base

Module Contents

class BaseStar(radius: float | astropy.units.Quantity[pytmosph3r.util.pt.length] = 695700000.0, mass: None | float | astropy.units.Quantity[pytmosph3r.util.pt.mass] = None, **kwargs)[source]

Bases: abc.ABC, pytmosph3r.log.Logger

This class represents the base properties of a star and the default methods implemented and required to be implemented.

Subclasses should implement _spectrum(self, wnedges: numpy.ndarray, wns: numpy.ndarray) -> Spectrum

Parameters:
  • radius (float, optional) – Stellar radius in`m`

  • mass (float, optional) – Stellar mass in kg

property mass_sol: float | None

Star mass (in solar mass).

property radius_sol: float

Star radius (in solar radii).

radius: float

Star radius (in m).

mass: float | None

Star mass (in kg).

spectrum(wnedges: numpy.ndarray, wns: numpy.ndarray, distance: float | None = None) exo_k.Spectrum[source]

Return the spectrum of the flux at the star surface by default, or at the distance given in meters (m).

Parameters:
  • wnedges (numpy.ndarray) – Wavenumbers of the bin edges to be used.

  • wns (numpy.ndarray) – Wavenumbers of the bin centers to be used.

  • distance (Optional[float]) – If distance is None, take the flux at the surface else take the flux seen at the given distance.

Returns:

Flux from the star.