starProfilefunction
A star's profile: how hot, how big, how bright, and how dark its edge. The temperature comes from a published scale for its spectral type and luminosity class (or its colour), the luminosity from its
brightness, distance and a bolometric correction, the radius from R = sqrt(L) / T² in solar units, and every figure carries its uncertainty. The error of each step is added: the parallax's own error (as the
catalogue gives it: a whole milliarcsecond for the Bright Star Catalogue's own parallaxes, 5% for dynamical ones), the temperature scale's scatter and the star's subtype, the bolometric correction, the
V magnitude (0.03 mag, more for variable and composite stars), and a guess at unseen dimming by dust (0.3 mag a kiloparsec). The magnitude and colour are not corrected for that dust: a distant star reads a little too faint and too red.
The apparent size of the disc needs no distance, so it is known for every star with a temperature. The radius needs a distance, or falls back on the typical radius of stars of the same type (basis: "type") where
the distance is missing or poorer than that. Where neither works the figure is undefined and unknown says why. Nothing is guessed silently.
Import it
import { starProfile } from "@johnmorrisdotca/hoshi-stars/profile";
Definition
function starProfile(star: ProfileInput): StarProfile
Parameters
| Name | Type | Description |
|---|---|---|
star | ProfileInput | A star, or anything with the same fields (build the Sun from its magnitude -26.74 and parallax 206,264,806 mas). |
Returns
StarProfile
The profile.
Examples
import { starByName } from "@johnmorrisdotca/hoshi-stars";
import { starProfile } from "@johnmorrisdotca/hoshi-stars/profile";
const sirius = starProfile(starByName("Sirius")!);
console.log(sirius.radius?.value.toFixed(2), sirius.radius?.range.map((r) => r.toFixed(2)), sirius.temperature?.value);1.82 [ '1.70', '1.95' ] 9506.06520725575What it prints (run when this page was built)