Reference · The Messier objects
GalaxyDistancetype
The distance to a galaxy, with what is known of where it came from. The headline is the median of the distances the source gives; no value is averaged with a different method's, because none states a method.
Import it
import type { GalaxyDistance } from "@johnmorrisdotca/hoshi-stars/deep-sky";
Also exported from: @johnmorrisdotca/hoshi-stars/deep-sky/ngc-ic
Definition
interface GalaxyDistance {
lightYears: number;
parsecs: number;
error: DistanceValue | null;
method: string;
sources: GalaxyDistanceSource[];
count: number;
spread: {
low: DistanceValue;
high: DistanceValue;
};
disagree: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
lightYears | number | The distance in light-years (the median of the statements). |
parsecs | number | The distance in parsecs (the median of the statements). |
error | DistanceValue | null | The error, or |
method | string | How the distance was measured. For every distance here it is |
sources | GalaxyDistanceSource[] | Where the values were read, for the credit line and the trace back. |
count | number | The number of statements the distance is the median of. |
spread | { low: DistanceValue; high: DistanceValue; } | The lowest and highest of the statements. The same value twice where there is one statement. |
disagree | boolean | True where the highest statement is more than 1.2 times the lowest: the sources disagree and the distance is good to less than the headline's digits. |
Examples
import { deepSkyObject, galaxyDistance, type GalaxyDistance } from "@johnmorrisdotca/hoshi-stars/deep-sky";
const distance: GalaxyDistance | null = galaxyDistance(deepSkyObject("M31")!);
console.log(distance?.lightYears, distance?.method);2674482.297277295 compiled, method not statedWhat it prints (run when this page was built)