absoluteMagnitude関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A star's absolute magnitude: how bright it would look from 10 parsecs (32.6 light-years), from its visual magnitude and its parallax (M = V + 5 + 5 log10(parallax in arc-seconds)). It is the brightness the Hertzsprung-Russell diagram plots against colour. The Sun is 4.83 and Sirius 1.45. The dimming of starlight by interstellar dust is not corrected, so a distant star is a little fainter than it is; the catalogue holds no figure for it.
インポート
import { absoluteMagnitude } from "@johnmorrisdotca/hoshi-stars";
定義
function absoluteMagnitude(star: Pick<Star, "magnitude" | "parallaxMas">): number | undefined
引数
| 名前 | 型 | 説明 |
|---|---|---|
star | Pick<Star, "magnitude" | "parallaxMas"> | A star, or anything with a visual magnitude and a parallax in milliarcseconds. |
戻り値
number | undefined
The absolute magnitude, or undefined where there is no parallax (or a non-positive one). It carries the parallax's error: a star with a poor parallax has a poor absolute magnitude.
例
import { absoluteMagnitude, starByName } from "@johnmorrisdotca/hoshi-stars";
console.log(absoluteMagnitude(starByName("Sirius")!)?.toFixed(2));1.45出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。