ProfileInputtype
What starProfile reads of a star: a Star has all of it, and so does anything built by hand (the Sun).
Import it
import type { ProfileInput } from "@johnmorrisdotca/hoshi-stars/profile";
Definition
type ProfileInput = Pick<Star, "magnitude" | "colourIndex" | "spectralType" | "luminosityClass" | "parallaxMas" | "parallaxErrorMas" | "parallaxSource"> & {
hr?: number | undefined;
};
Members
| Name | Type | Description |
|---|---|---|
magnitude | number | Visual magnitude: smaller is brighter, and Sirius is -1.46. |
parallaxMas | number | The annual parallax in milliarcseconds, to a tenth where |
parallaxErrorMas | number | undefined | The standard error of |
parallaxSource | "GCTP" | "BSC" | "dynamical" | "literature" | undefined | Where the parallax is from: |
colourIndex | number | undefined | The colour index B-V in magnitudes, or |
spectralType | string | The spectral type as the catalogue gives it, whole ( |
luminosityClass | LuminosityClass | undefined | The luminosity class in |
hr (optional) | number | undefined |
Examples
import { starProfile, type ProfileInput } from "@johnmorrisdotca/hoshi-stars/profile";
const sun: ProfileInput = { magnitude: -26.74, colourIndex: 0.65, spectralType: "G2V", luminosityClass: "V", parallaxMas: 206_264_806.2, parallaxErrorMas: 1, parallaxSource: "GCTP" };
console.log(starProfile(sun).radius?.value.toFixed(2));1.00What it prints (run when this page was built)