Documentation
¶
Overview ¶
Package stars is stars as data: a mass and an age go in, and out comes what the star is now, with its temperature, brightness and size.
Nothing here is a number picked by hand in code. measure holds nature's constants and the units; celestial's research data what stars takes on trust besides, each with its source; mainsequence.txt a table.
A star's life is a run of parts, each a state that lasts a while and hands on to the next. Two are built: burning, and ended. What an ended star leaves comes with the published tables that say which and how.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Life ¶ added in v0.0.3
type Life struct {
// contains filtered or unexported fields
}
Life is the part of its life a star is in: Burning or Ended.
type Star ¶
type Star struct {
// contains filtered or unexported fields
}
Star is a star at an age: what it is, and what it gives off.
func NewStar ¶
NewStar is a star of a mass at birth, at an age. It refuses a mass the published main sequence does not reach, either way, and an age below nought or older than the universe, and then gives no star.
Each check says what must hold, so a NaN, which fails every comparison, is refused too.
func (Star) Luminosity ¶
Luminosity is how bright the star is, at every wavelength, not only those an eye sees.
func (Star) Temperature ¶
func (star Star) Temperature() measure.Temperature
Temperature is the star's surface temperature; an ended star's is nought here.