ExoplanetHosttype
One host star with its planets.
Import it
import type { ExoplanetHost } from "@johnmorrisdotca/hoshi-stars/exoplanet-hosts";
Definition
interface ExoplanetHost {
id: string;
name: string;
nameJa: string | undefined;
designation: string;
archiveName: string;
aliases: readonly string[];
constellation: string;
rightAscension: number;
declination: number;
positionErrorArcsec: number | undefined;
lightYears: number;
lightYearsError: number;
spectralType: string | undefined;
luminosityClass: LuminosityClass | undefined;
magnitude: number | undefined;
nearStarId: string | undefined;
selection: ExoplanetHostSelection;
planetCount: number;
planets: readonly Exoplanet[];
references: readonly string[];
sources: {
position: ExoplanetHostSource;
distance: "GCTP" | "BSC" | "dynamical" | "typed";
spectralType: ExoplanetHostSource | undefined;
magnitude: ExoplanetHostSource | undefined;
planets: "NASA Exoplanet Archive";
};
}
Members
| Name | Type | Description |
|---|---|---|
id | string | A key that stays the same: |
name | string | The star's name ( |
nameJa | string | undefined | The name in Japanese where known, else |
designation | string | The star's designation with Greek letters where it has one ( |
archiveName | string | The name the NASA Exoplanet Archive gives the host ( |
aliases | readonly string[] | Other spellings that find the host ( |
constellation | string | The IAU three-letter constellation abbreviation the star lies in. |
rightAscension | number | Right ascension in degrees at J2000, 0 up to 360. |
declination | number | Declination in degrees at J2000, -90 to 90. |
positionErrorArcsec | number | undefined | The error of the position in arc-seconds where the table gives one, else |
lightYears | number | The distance in light-years, known to 10% or better. |
lightYearsError | number | The error of |
spectralType | string | undefined | The spectral type, or |
luminosityClass | LuminosityClass | undefined | The luminosity class in |
magnitude | number | undefined | The V magnitude, or |
nearStarId | string | undefined | The id of the system in |
selection | ExoplanetHostSelection | Why the star is in the table. |
planetCount | number | The number of confirmed planets in |
planets | readonly Exoplanet[] | The confirmed planets (not flagged controversial), by letter. |
references | readonly string[] | Papers behind the typed values, empty for the others. |
sources | { position: ExoplanetHostSource; distance: "GCTP" | "BSC" | "dynamical" | "typed"; spectralType: ExoplanetHostSource | undefined; magnitude: ExoplanetHostSource | undefined; planets: "NASA Exoplanet Archive"; } | Where each value comes from. |
Examples
import { exoplanetHostByName, type ExoplanetHost } from "@johnmorrisdotca/hoshi-stars/exoplanet-hosts";
const host: ExoplanetHost = exoplanetHostByName("TRAPPIST-1")!;
console.log(host.name, host.planetCount, host.lightYears.toFixed(1));TRAPPIST-1 7 39.5What it prints (run when this page was built)