Wolfram 天文学 | 应用示例

在代码中点击并按下
+
,即可编辑并运行任何代码。
计算与可视化天文数据。利用精选的天文数据和从最新星历表获取的精确位置信息,使天文学变得可计算。轻松创建详细的星图,并可视化过去或未来的天文事件。

天文计算

计算火星相对于本地当前地平线的位置:
Run
In[]:=
AstroPosition
Mars
PLANET
,"Horizon"
计算河鼓二的赤道坐标:
Run
In[]:=
AstroPosition
Altair
STAR
,"Equatorial"
计算心宿二的平均黄道坐标:
Run
In[]:=
AstroPosition
Antares
STAR
,"MeanEcliptic"
计算南门二的银道坐标:
Run
In[]:=
AstroPosition
Rigil Kentaurus
STAR
,"Galactic"
可视化从地球上观察各种参考面相对于银河参考面的位置:
Run
In[]:=
AstroGraphicsAstroReferenceFrame->"Galactic",
Earth
PLANET
,AstroBackground->"GalacticSky"

精确的太阳系动力学

绘制 2000 年至 2040 年间从伦敦观测到的木星和土星之间的角距:
Run
In[]:=
PlotAstroAngularSeparation
Jupiter
PLANET
,
Saturn
PLANET
,Dated
London
CITY
,year,{year,2000,2040}
计算 2009 年 8 月 27 日木星和木卫二之间的最近视会遇点,即“最小角距”:
Run
In[]:=
date=FindAstroEvent{"Appulse",Entity["Planet","Jupiter"],Entity["PlanetaryMoon","Europa"]},
Thu 27 Aug 2009
,TimeZone"Europe/Rome"
可视化该日期木卫二和木星的位置,并在同一区域观察木卫一,定向在黄道方向:
Run
In[]:=
ResourceFunction["TelescopeView3D"]
Jupiter
PLANET
,date,
Padua
CITY
,"SatellitesToInclude"->EntityClass["PlanetaryMoon","GalileanMoon"],ViewVertical->{0,0,1}

日月食

确定 2024 年 4 月 8 日最大日食的日期:
Run
In[]:=
eclipse=SolarEclipse[DateObject[{2024,4,8}]]
生成日食路径和日食其他相关元素的地图:
Run
In[]:=
SolarEclipse[eclipse,"EclipseMap"]

天文公式

用自然语言搜索公式:
Run
In[]:=
forms=Join[FormulaLookup["apparent magnitude formula"],FormulaLookup["parallax formula"],FormulaLookup["Drake's equation"],FormulaLookup["stellar energy flux equation"],{FormulaLookup["black hole temperature"][[1]]}]
获取公式:
Run
In[]:=
eqs=FormulaData/@forms
用传统格式显示公式:
Run
In[]:=
TraditionalForm[Column[eqs]]
计算两颗视星等不同的恒星之间的亮度比:
Run
In[]:=
FormulaData["ApparentMagnitudeIntensity",{
m
1
->4.5,
m
2
->6.35}]

天文数据

随机选择一颗阿波罗小行星:
Run
In[]:=
asteroid=RandomChoiceEntityList
Apollo asteroids
MINOR PLANETS

查询小行星的各种属性:
Run
In[]:=
EntityValue[asteroid,{"SemimajorAxis","Eccentricity","Inclination","Apoapsis","Periapsis"},"Dataset"]
绘制阿波罗小行星轨道半长轴值的直方图:
Run
In[]:=
Histogram
Apollo asteroids
MINOR PLANETS
["DistanceFromSun"],


天文可视化

可视化 2024 年 8 月 15 日晚上 10 点的天空,看向正南方向,中心位于地平线上方 30°:
Run
In[]:=
AstroGraphics[AstroReferenceFrame->{"Horizon",DateObject[{2024,8,15,22,0,0}]},AstroBackground->"GalacticSky",AstroProjection->"Stereographic",AstroRange->Quantity[35,"AngularDegrees"],AstroCenter->{180,30}]

星座和星图

定义星图的样式:
Run
In[]:=
style={"ShowConstellationIllustrations"->True,"ShowConstellationRegions"->True,"ConstellationRegionStyle"->Darker[Blue,.2],"ConstellationLineStyle"->Opacity[0.6,LightBlue],"ShowConstellationBoundaries"->True,"ConstellationBoundaryStyle"->Directive[Dashing[{0,Tiny}],Yellow],"ConstellationNameStyle"->GrayLevel[0.7],"ShowSolarSystemObjects"->False};
可视化看向天蝎座的天空,同时显示自定义样式的示意图和边界:
Run
In[]:=
AstroGraphics
Scorpius
CONSTELLATION
,AstroBackground->AstroStyling"GalacticSky","ShowConstellations"->
Scorpius
CONSTELLATION
,style,AstroReferenceFrame->"J2000"

天文学中的时间

计算火星从 2022 年 7 月至 2023 年 7 月每周的位置:
Run
In[]:=
mars=AstroPosition[Entity["Planet","Mars"],{"Equatorial",#}]&/@DateRange["1 Jul 2022","1 July 2023","Week"];
部分轨迹处于逆行状态:
Run
In[]:=
AstroGraphics[{White,Point[mars]},AstroReferenceFrame->"Equatorial"]

宇宙中的尺度

定义一个纳米尺度的方程:
Run
In[]:=
equation=FormulaData[{"PlanckRadiationLaw","Wavelength"},{"T"->Quantity[5000,"Kelvins"],"λ"->Quantity[wl,"Nanometers"]}][[2,2]];
在一定波长范围内绘制方程:
Run
In[]:=
Plot[equation,{wl,200,5000},AxesLabel->{"Wavelength (nm)","Spectral radiance (W
-1
sr
-3
m
​)"}]
探索随意组成的宇宙学模型的特性:
Run
In[]:=
UniverseModelData[Quantity[10^9,"Parsecs"],<|"OmegaLambda"->0,"OmegaMatter"->0.8,"OmegaRadiation"->0.2,"HubbleH0"->Quantity[50,("Kilometers")/("Megaparsecs""Seconds")]|>]

天体地理

用自然语言解释太阳系的特征:
Run
In[]:=
feature=Interpreter["SolarSystemFeature"]["Sinai Planum"]
生成太阳系特色地点的地形图:
Run
In[]:=
GeoGraphics[GeoCenter->feature,GeoBackground->"ReliefMap",GeoRange->Quantity[1000,"Miles"]]