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 · The sky out to a distance, in layers: the stars and galaxies nearer than 10, 50, 100, 500 or 1,000 light-years, each distance band its own colour, the ones with an uncertain distance kept apart, and none placed at a guess

layersByDistancefunction

The things out to a limit, each in the band of its distance. With no limit (or Infinity) every thing that has a distance is kept. A thing with no distance is counted and never placed. A thing whose distance is rough is kept apart as uncertain when the nearest its error allows is inside the limit, and is counted in uncertain, not in a band.

Import it

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

Definition

function layersByDistance(inputs: readonly DistanceInput[], options?: { limit?: number; }): DistanceLayers

Parameters

NameTypeDescription
inputsreadonly DistanceInput[]

The things: from starInput, nearbyInput and deepSkyInput, in any mix.

options (optional){ limit?: number; }

limit: the farthest in light-years; left out for all.

Returns

DistanceLayers

The things within the limit, nearest first, with the counts.

Examples

import { stars } from "@johnmorrisdotca/hoshi-stars";
import { layersByDistance, starInput } from "@johnmorrisdotca/hoshi-stars/distance";

const layers = layersByDistance(stars().map(starInput), { limit: 50 });
console.log(layers.things.length, layers.counts.slice(0, 2), layers.unknown);
157 [ 3, 123 ] 2517

What it prints (run when this page was built)

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