Skip to the content

Hoshi Stars documentation

Hoshi Stars API: every export

Every export of every entry point, each with its own page. This page keeps the addresses the old one-page reference had.

@johnmorrisdotca/hoshi-stars/constellations

constellationfunction

A constellation by any of its names, ignoring case and the accent on Boötes: the IAU abbreviation (CMa), the Latin name (Canis Major), the genitive (Canis Majoris), the English name (Great Dog), the Japanese name with or without 座 (おおいぬ座, おおいぬ) in katakana or hiragana, or its hiragana reading (おおいぬざ).

constellationsfunction

All 88 constellations, alphabetical by Latin name (Andromeda first, Vulpecula last).

starsInfunction

The bright stars that lie in a constellation, brightest first: every star of the Yale Bright Star Catalogue (to magnitude 6.0) whose constellation is that abbreviation, with a Bayer letter or a Flamsteed number or without one.

@johnmorrisdotca/hoshi-stars/lines

Figuretype

The stick figure of one constellation.

figureOffunction

The stick figure of one constellation: the bright stars to join, as pairs.

figuresfunction

The stick figures of all 88 constellations, in the order of constellations() (alphabetical by Latin name).

@johnmorrisdotca/hoshi-stars/boundaries

boundariesfunction

The boundaries of all 88 constellations, alphabetical by Latin name like constellations().

Boundarytype

The boundary of one constellation, as lines to draw.

boundaryOffunction

The boundary of one constellation as closed outlines in J2000 degrees, ready to draw.

@johnmorrisdotca/hoshi-stars/deep-sky

DEEP_SKY_TYPESconstant

The kinds of deep-sky object, a small fixed list.

deepSkyfunction

The Messier objects that meet the options, in Messier order.

deepSkyObjectfunction

A Messier object by any of its names, ignoring case, spacing and the accent on a letter: the Messier designation (M31, m 31, Messier 31), its NGC or IC designation (NGC 224, ngc224) or its common name in English (Andromeda Galaxy, Andromeda Nebula).

DeepSkyOptionstype

The options of deepSky: all optional, and together they narrow the list.

DeepSkyTypetype

The kind of a deep-sky object: galaxy, globular cluster, open cluster, nebula (emission, reflection and dark nebulae and H II regions), planetary nebula, supernova remnant, or other (an asterism, a star cloud, a double star, a source that is not any of those).

messierfunction

The 110 Messier objects, M1 first and M110 last.

@johnmorrisdotca/hoshi-stars/deep-sky/ngc-ic

DEEP_SKY_TYPESconstant

The kinds of deep-sky object, a small fixed list.

deepSkyfunction

The Messier, NGC and IC objects that meet the options: the Messier objects first in Messier order, then the others by NGC number and then IC number.

deepSkyObjectfunction

An object by any of its names, ignoring case, spacing and the accent on a letter: M31, Messier 31, NGC 224, IC 434, an object's other NGC or IC number (NGC 1051 for NGC 961) or its common name in English (North America Nebula).

DeepSkyOptionstype

The options of deepSky: all optional, and together they narrow the list.

DeepSkyTypetype

The kind of a deep-sky object: galaxy, globular cluster, open cluster, nebula (emission, reflection and dark nebulae and H II regions), planetary nebula, supernova remnant, or other (an asterism, a star cloud, a double star, a source that is not any of those).

@johnmorrisdotca/hoshi-stars/projection

projectfunction

Where a point of the sky lands on the chart.

PROJECTIONSconstant

The projections: the five that show a hemisphere or less, then the two that show the whole sky.

SkyPointtype

A point on the celestial sphere, in degrees.

unprojectfunction

The sky position under a point of the chart: the inverse of project, with the same options.

@johnmorrisdotca/hoshi-stars/milky-way

fromGalacticfunction

The right ascension and declination (J2000) of a point given in galactic coordinates.

MilkyWayBandtype

Everywhere the Milky Way is brighter than one level.

milkyWayBandsfunction

The Milky Way cut at some brightness levels, as ribbons of sky points for drawing soft bands (a polygon per strip, filled with a low opacity so the levels build up).

milkyWayBrightnessfunction

How bright the Milky Way is toward a point, as a display value from 0 (dark sky) to 1 (the brightest part of the core, in Sagittarius).

MilkyWayStriptype

A ribbon of the Milky Way at one brightness level: two chains of sky points of the same length, the upper edge and the lower, each pair at the same galactic longitude.

SkyPointtype

A point on the celestial sphere, in degrees.

toGalacticfunction

The galactic longitude and latitude of a point of the sky (J2000, the IAU's galactic frame).

@johnmorrisdotca/hoshi-stars/sky

greenwichSiderealTimefunction

The Greenwich mean sidereal time: how far the Earth has turned against the stars, as the right ascension on the meridian of Greenwich, in degrees (Meeus 12.4, the IAU 1982 expression).

horizontalfunction

Where a star (or any J2000 position) stands in the sky of a place on Earth at a moment: its altitude above the horizon and azimuth from north through east.

Horizontaltype

Where a star or a planet is in your sky: degrees above the horizon (negative below it) and degrees round from north through east.

horizontalFromfunction

Where a star stands in the sky of a place on ANOTHER planet: the sky turns about that planet's pole (the IAU WGCCRE pole and prime meridian, passed in as spin), so the star is rotated into the planet's own equatorial frame, its hour angle is the prime meridian plus the observer's east longitude minus its right ascension there, and the horizon formulas are the same as for Earth.

isAboveHorizonfunction

Whether a position is above the horizon of a place at a moment (altitude greater than 0).

localSiderealTimefunction

The local mean sidereal time: the right ascension that is on your meridian, due south or north of you, in degrees.

Observertype

Where you stand on Earth, in degrees.

PlanetSpintype

The spin of another planet, as the IAU WGCCRE gives it: where its north pole points, and how far its prime meridian has turned.

precessfunction

A J2000 position carried to the mean equator and equinox of a date: the precession of the Earth's axis (Meeus chapter 21, the rigorous method with the IAU 1976 constants, good for a few centuries either side of 2000 to far under an arc-second).

SkyPointtype

A point on the celestial sphere, in degrees.

@johnmorrisdotca/hoshi-stars/nearest

nearestfunction

The things nearest a star, a deep-sky object or a point, nearest first.

NearestInSkytype

One answer of a query by angle: the thing and its angle from the target, in degrees.

NearestListtype

A list of answers, nearest first, with skipped: how many candidates had no usable distance and so were left out of a query by: "space" (a parallax of 0 or less, or a deep-sky object).

NearestTargettype

Where a query starts: a star, a deep-sky object, a name starByName or deepSkyObject (the Messier objects) finds, or a point in J2000 degrees.

NearestThingtype

Something a query can find: a bright star, a nearby star (from /nearby, passed in among) or a deep-sky object.

neighbouringConstellationsfunction

The constellations that share a piece of boundary with one constellation, in alphabetical order of their Latin names.

withinfunction

Everything within a radius of a target, nearest first: nearest with no count limit and within set to the radius.

@johnmorrisdotca/hoshi-stars/nearby

NearbyMagnitudeKindtype

The kind of a V magnitude in the Yale catalogue: a photoelectric V, a visual or other magnitude of lower accuracy, or a photographic blue one.

NearbyPositionSourcetype

Where a star's position comes from: a 2MASS source found for it (good to a fraction of an arc-second), or the Yale catalogue's own position (taken to J2000 from 1900, good to arc-seconds at best, an arc-minute at worst).

NearbyStartype

One nearby star, as the Yale General Catalogue of Trigonometric Stellar Parallaxes gives it, with a 2MASS position where there is one.

nearbyStarByNamefunction

A nearby star by a name, ignoring case: its common name (Proxima Centauri), a name the catalogue gives it (G 158-027), its designation (33 Psc), GJ 551 or Gliese 551, HD 95735, GCTP 2576 or its 2MASS designation (with or without 2MASS J).

nearbyStarsfunction

The nearby stars, nearest first (the ones with no distance last).

@johnmorrisdotca/hoshi-stars

blackBodyColourfunction

The colour of a black body at a temperature, as a #rrggbb string, for drawing a star.

Startype

One star, as the Yale Bright Star Catalogue gives it.

starByHrfunction

A star by its Bright Star Catalogue number.

starByNamefunction

A star by its common name (Sirius), its name in katakana (シリウス) or its designation (α CMa, 9 CMa), ignoring case.

starColourfunction

The colour to draw a star: from its B-V index, or a plain white where the catalogue has none.

starPositionfunction

Where a star is at a moment: its J2000 position carried forward (or back) by its proper motion in a straight line.

starsfunction

The stars to a magnitude, brightest first.

starTemperatureKfunction

The surface temperature a colour index implies, in kelvin, by Ballesteros's relation between B-V and a black body.

Whentype

A moment: a Date or a number of milliseconds since 1970 (UTC, as JavaScript counts).