Reference · The Milky Way: a brightness map and soft bands to draw
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). It follows the band along the galactic equator, is brightest toward the Galactic centre, and is dimmer where the dust lanes cross it (the Great Rift, the Coalsack, the Cygnus Rift). The grid is 0.5 degrees on a side near the plane and holds thirty-two levels, so it is a smooth map for shading a chart or a texture, not a measurement; beyond 30 degrees of the plane it is 0. The values are already shaped for the eye (a gamma of about 0.45), so use them as a pixel's brightness directly.
Import it
import { milkyWayBrightness } from "@johnmorrisdotca/hoshi-stars/milky-way";
Definition
function milkyWayBrightness(point: SkyPoint): number
Parameters
| Name | Type | Description |
|---|---|---|
point | SkyPoint | A right ascension and declination in degrees (J2000). |
Returns
number
A number from 0 to 1.
Examples
import { milkyWayBrightness } from "@johnmorrisdotca/hoshi-stars/milky-way";
const sagittarius = milkyWayBrightness({ rightAscension: 266.4, declination: -28.9 });
const pole = milkyWayBrightness({ rightAscension: 192.9, declination: 27.1 });
console.log(sagittarius > pole); // truetrueWhat it prints (run when this page was built)