Reference · Sky cultures: the figure and culture types, and your own culture
Asterismtype
One figure of a sky culture: its names, its reading and the stars it joins, as Bright Star Catalogue (HR) numbers. figures(culture) and figureOf(text, culture) turn it into stars and lines.
Import it
import type { Asterism } from "@johnmorrisdotca/hoshi-stars/culture";
Definition
interface Asterism {
readonly id: string;
readonly name: string;
readonly names: Readonly<Partial<Record<NameLanguage, string>>>;
readonly readings: Readonly<{
ja?: string;
zh?: string;
}>;
readonly aka: readonly string[];
readonly about: string;
readonly kind: AsterismKind;
readonly group: string | undefined;
readonly partOf?: string;
readonly missing: number;
readonly numbers?: Readonly<Record<number, number>>;
readonly chains: ReadonlyArray<readonly number[]>;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | A short ASCII key, stable between releases: the IAU abbreviation for a constellation ( |
name | string | The name in the culture's own writing: the Latin name ( |
names | Readonly<Partial<Record<NameLanguage, string>>> | The name in each language the figure has one in. |
readings | Readonly<{ ja?: string; zh?: string; }> | How the name is read: |
aka | readonly string[] | Other names it is called by, accepted by |
about | string | A few English words on what it is ( |
kind | AsterismKind | Whether it is a constellation, an asterism or a Chinese mansion. |
group | string | undefined | For a Chinese mansion, the quarter of the sky it belongs to ( |
partOf (optional) | string | undefined | For a Chinese asterism, the enclosure ( |
missing | number | At least how many of its stars are not held: fainter than visual magnitude 6.0, which the catalogue does not hold, or (for a figure read from a source that names stars by number) not named with a catalogue number in that source, so we cannot tell which. The figure draws only the stars we have. 0 where all are held or none is known to be missing. |
numbers (optional) | Readonly<Record<number, number>> | undefined | Each held star's number in the figure, by Bright Star Catalogue number, where the culture numbers its stars: the Chinese sky's names do (角宿一 is star 1 of 角宿). |
chains | readonly (readonly number[])[] | The stars as HR numbers: chains, each a run of stars joined one to the next; a chain of one is a single star. |
Examples
import { chinese } from "@johnmorrisdotca/hoshi-stars/cultures/chinese";
const dipper = chinese.find("北斗")!;
console.log(dipper.name, dipper.readings.zh, dipper.chains.length);
// each star's number in the asterism: 角宿一 (Spica, HR 5056) is star 1
console.log(chinese.find("角宿")!.numbers);北斗 běi dǒu 1
{ '5056': 1, '5107': 2 }What it prints (run when this page was built)