Reference
How well each value of a star is known: the source and error of its position, magnitude, colour, parallax and proper motion, and a grade A, B or C
import { … } from "@johnmorrisdotca/hoshi-stars/accuracy";
1.5 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
AccuracySource | type | Where a value is from: BSC the Yale Bright Star Catalogue, GCTP the Yale General Catalogue of Trigonometric Stellar Parallaxes, 2MASS the Two Micron All Sky Survey, dynamical the Bright Star Catalogue's parallax from the orbit of a binary, literature a distance typed from a published paper (Betelgeuse, Rigel, Polaris). |
checkGrade | function | Whether a value is a grade: "A", "B" or "C". |
DistanceAccuracy | type | The distance of a star in numbers: what the parallax's error makes of it. |
DistanceQuality | type | How well a star's distance is known, from its parallax and the error the catalogue states: good (the error is under 5% of the parallax), fair (5% to 20%, or a dynamical parallax from a binary's orbit), rough (over 20%, or a parallax with no stated error) and none (no parallax: the distance is unknown). |
FieldAccuracy | type | What is known about one value of a star. |
GRADE_RULES | constant | The numbers the grade is decided by: a distance is good under distance.good of the parallax and fair up to distance.fair (the same bands as distanceQuality), and a position is modern when its error, or its resolution where it has no stated error, is at most modernPositionArcsec. |
gradeAtLeast | function | Whether a grade is at least as good as another: A is at least B, and B is at least B, but C is not at least B. |
STAR_GRADES | constant | The grades, best first. |
starAccuracy | function | How well each value of a star is known, and its grade. |
StarAccuracy | type | Everything starAccuracy says of one star. |
starGrade | function | A star's grade alone, worked out without building the whole record: the same answer as starAccuracy(star).grade, cheap enough to filter thousands of stars with. |
StarGrade | type | The grade of a star: A a distance known to under 5% and a modern position, B a distance known to 20% or better (or one known to under 5% with a coarse position), C anything else: a position and a rough or missing distance. |