StellarSpectrum

class kelp.StellarSpectrum(wavelength, spectral_flux_density)[source] [edit on github]

Bases: object

Parameters:
wavelengthQuantity

Wavelength array for stellar spectrum

spectral_flux_densityQuantity

Spectral flux density as a function of wavelength. Should have units compatible with W/m^2/micron, for example.

Methods Summary

from_blackbody(T_s)

Return PHOENIX model stellar spectrum for a star with a given effective temperature T_s and surface gravity log_g.

from_phoenix(T_s[, log_g, cache])

Return PHOENIX model stellar spectrum for a star with a given effective temperature T_s and surface gravity log_g.

from_zeros([size])

Construct a stellar spectrum with all zeros as the wavelength and spectrum arrays.

plot([ax])

Plot the stellar spectrum.

Methods Documentation

classmethod from_blackbody(T_s)[source] [edit on github]

Return PHOENIX model stellar spectrum for a star with a given effective temperature T_s and surface gravity log_g.

Parameters:
T_sint

Effective temperature

log_gfloat

Surface gravity

classmethod from_phoenix(T_s, log_g=4.5, cache=False)[source] [edit on github]

Return PHOENIX model stellar spectrum for a star with a given effective temperature T_s and surface gravity log_g.

Parameters:
T_sint

Effective temperature

log_gfloat

Surface gravity

cachebool

Cache the retrieved stellar spectrum.

classmethod from_zeros(size=10)[source] [edit on github]

Construct a stellar spectrum with all zeros as the wavelength and spectrum arrays.

This effectively turns off the custom stellar spectrum feature.

plot(ax=None, **kwargs)[source] [edit on github]

Plot the stellar spectrum.

Parameters:
axAxes

Matplotlib axis object

kwargsdict

Dictionary passed to the plot command

Returns:
axAxes

Updated axis object