Stellar Models (taurex.stellar)

Base

class Star(temperature: float | None = 5000, radius: float | None = 1.0, distance: float | None = 1, magnitudeK: float | None = 10.0, mass: float | None = 1.0, metallicity: float | None = 1.0)[source]

Bases: Fittable, Loggable, Writeable, Citable

A base class that holds information on the star in the model. Its implementation is a star that has a blackbody spectrum.

property distanceSystem: float

Distance from Earth to the System (in pc).

initialize(wngrid: ndarray[tuple[int, ...], dtype[float64]]) None[source]

Initializes the blackbody spectrum on the given wavenumber grid

Parameters:

wngrid (array) – Wavenumber grid cm-1 to compute black body spectrum

classmethod input_keywords() Tuple[str, ...][source]

Input keywords for star.

property mass: float

Mass in kg.

property radius: float

Radius in metres.

property spectralEmissionDensity: ndarray[tuple[int, ...], dtype[float64]]

Spectral emmision density in W/m2/cm-1/sr.

property temperature: float

Blackbody temperature in Kelvin.

write(output: OutputGroup) OutputGroup[source]

Write to output group.

Blackbody

class BlackbodyStar(temperature: float | None = 5000, radius: float | None = 1.0, distance: float | None = 1, magnitudeK: float | None = 10.0, mass: float | None = 1.0, metallicity: float | None = 1.0)[source]

Bases: Star

Alias for the base star type

classmethod input_keywords() Tuple[str, ...][source]

Input keywords for star.

PHOENIX

Module for loading in PHOENIX spectra.

class PhoenixStar(temperature: float | None = 5000, radius: float | None = 1.0, metallicity: float | None = 1.0, mass: float | None = 1.0, distance: float | None = 1, magnitudeK: float | None = 10.0, phoenix_path: str | bytes | PathLike | Path | None = None, retro_version_file: str | bytes | PathLike | Path | None = None)[source]

Bases: BlackbodyStar

A star that uses the PHOENIX synthetic stellar atmosphere spectrums.

These spectrums are read from .gits.gz files in a directory given by phoenix_path Each file must contain the spectrum for one temperature

Parameters:
  • phoenix_path (str, required) – Path to folder containing phoenix fits.gz files

  • temperature (float, optional) – Stellar temperature in Kelvin

  • radius (float, optional) – Stellar radius in Solar radius

  • metallicity (float, optional) – Metallicity in solar values

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

  • distance (float, optional) – Distance from Earth in pc

  • magnitudeK (float, optional) – Maginitude in K band

Raises:

Exception – Raised when no phoenix path is defined

BIBTEX_ENTRIES = ['\n        @article{ refId0,\n            author = {{Husser, T.-O.} and {Wende-von Berg, S.} and\n            {Dreizler, S.} and {Homeier, D.} and {Reiners, A.} and\n            {Barman, T.} and {Hauschildt, P. H.}},\n            title = {A new extensive library of PHOENIX stellar atmospheres and\n                synthetic spectra},\n            DOI= "10.1051/0004-6361/201219058",\n            url= "https://doi.org/10.1051/0004-6361/201219058",\n            journal = {A\\&A},\n            year = 2013,\n            volume = 553,\n            pages = "A6",\n            month = "",\n        }\n        ']

List of bibtex entries.

compute_logg() float[source]

Computes log(surface_G).

find_nearest_file() str[source]

Finds the nearest file to the current stellar parameters.

get_avail_phoenix() None[source]
initialize(wngrid: ndarray[tuple[int, ...], dtype[float64]])[source]

Initializes and interpolates the spectral emission density

SED is interpolated to the current stellar temperature and given wavenumber grid

Parameters:

wngrid – Wavenumber grid to interpolate the SED to

classmethod input_keywords() Tuple[str, ...][source]

Input keywords for star.

property mass: float

Mass of star in solar mass.

Returns:

M

Return type:

float

read_spectra(p_file: str | bytes | PathLike | Path) None[source]

Reads in the spectra from a given file.

recompute_spectra() None[source]

Recompute spectra as needed.

property spectralEmissionDensity: float

Spectral emmision density in W/m^2/um.

Returns:

sed

Return type:

array

property temperature: float

Effective Temperature in Kelvin.

Returns:

T

Return type:

float

write(output: OutputGroup) OutputGroup[source]

Write to output group.