Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · Stars: names, positions, distance and colour

luminosityClassfunction

The luminosity class a spectral type states: the first class in the string (Ia for M1-2Ia-Iab, IV for F5IV-V, V for A0Va, III for gK2, whose g is the old word for a giant). A white dwarf type (DA2) is D. A type with no class, such as Am or K0, gives undefined.

Import it

import { luminosityClass } from "@johnmorrisdotca/hoshi-stars";

Definition

function luminosityClass(spectralType: string): LuminosityClass | undefined

Parameters

NameTypeDescription
spectralTypestring

A spectral type as a catalogue prints it (K1.5IIIFe-0.5, M5.5eV).

Returns

LuminosityClass | undefined

The class, or undefined where the type states none.

Examples

import { luminosityClass } from "@johnmorrisdotca/hoshi-stars";

console.log(luminosityClass("A1Vm"), luminosityClass("K0III"), luminosityClass("Am"));
V III undefined

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.