Wolfram Astronomy | Things to Try

Make edits and run any piece of code by clicking inside the code and pressing
+
.
Compute and Visualize Astronomical Data. Make astronomy computable with curated astronomical data and precise positional information obtained from the latest available ephemerides. Easily create detailed maps of the sky and visualize astronomical events from the past or future.

Astro Computation

Compute the position of Mars with respect to the current local horizon:
Run
In[]:=
AstroPosition
Mars
PLANET
,"Horizon"
Compute the equatorial coordinates of Altair:
Run
In[]:=
AstroPosition
Altair
STAR
,"Equatorial"
Compute the mean ecliptic coordinates of Antares:
Run
In[]:=
AstroPosition
Antares
STAR
,"MeanEcliptic"
Compute the galactic coordinates of Rigil Kentaurus:
Run
In[]:=
AstroPosition
Rigil Kentaurus
STAR
,"Galactic"
Visualize various reference planes with respect to the galactic reference plane as seen from Earth:
Run
In[]:=
AstroGraphicsAstroReferenceFrame->"Galactic",
Earth
PLANET
,AstroBackground->"GalacticSky"

Precise Solar System Dynamics

Plot the angular separation between Jupiter and Saturn as observed from London between the years 2000 and 2040:
Run
In[]:=
PlotAstroAngularSeparation
Jupiter
PLANET
,
Saturn
PLANET
,Dated
London
CITY
,year,{year,2000,2040}
Compute the closest apparent approach, called appulse, between Jupiter and Europa on August 27, 2009:
Run
In[]:=
date=FindAstroEvent{"Appulse",Entity["Planet","Jupiter"],Entity["PlanetaryMoon","Europa"]},
Thu 27 Aug 2009
,TimeZone"Europe/Rome"
Visualize the position of Europa and Jupiter on that date and observe Io in the same field, oriented with the ecliptic:
Run
In[]:=
ResourceFunction["TelescopeView3D"]
Jupiter
PLANET
,date,
Padua
CITY
,"SatellitesToInclude"->EntityClass["PlanetaryMoon","GalileanMoon"],ViewVertical->{0,0,1}

Eclipses

Resolve the date of maximum eclipse on April 8, 2024:
Run
In[]:=
eclipse=SolarEclipse[DateObject[{2024,4,8}]]
Generate a map of the eclipse path and other relevant elements of the eclipse geometry:
Run
In[]:=
SolarEclipse[eclipse,"EclipseMap"]

Astro Formulas

Search for formulas using natural language:
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]]}]
Retrieve equations for formulas:
Run
In[]:=
eqs=FormulaData/@forms
Display formulas using traditional notation:
Run
In[]:=
TraditionalForm[Column[eqs]]
Compute the brightness ratio between two stars with different apparent magnitude:
Run
In[]:=
FormulaData["ApparentMagnitudeIntensity",{
m
1
->4.5,
m
2
->6.35}]

Astro Data

Randomly select an Apollo asteroid:
Run
In[]:=
asteroid=RandomChoiceEntityList
Apollo asteroids
MINOR PLANETS

Query for various properties for the asteroid:
Run
In[]:=
EntityValue[asteroid,{"SemimajorAxis","Eccentricity","Inclination","Apoapsis","Periapsis"},"Dataset"]
Plot a histogram of the orbital semimajor axis values for the Apollo asteroids:
Run
In[]:=
Histogram
Apollo asteroids
MINOR PLANETS
["DistanceFromSun"],


Astro Visualization

Visualize the sky looking due south and centered 30° above the horizon on August 15, 2024, at 10pm:
Run
In[]:=
AstroGraphics[AstroReferenceFrame->{"Horizon",DateObject[{2024,8,15,22,0,0}]},AstroBackground->"GalacticSky",AstroProjection->"Stereographic",AstroRange->Quantity[35,"AngularDegrees"],AstroCenter->{180,30}]

Constellations and Star Maps

Define some custom styles for a star map:
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};
Visualize the sky looking at the constellation Scorpius and include the custom styles with illustrations and boundaries:
Run
In[]:=
AstroGraphics
Scorpius
CONSTELLATION
,AstroBackground->AstroStyling"GalacticSky","ShowConstellations"->
Scorpius
CONSTELLATION
,style,AstroReferenceFrame->"J2000"

Time in Astronomy

Compute weekly positions of Mars from July 2022 to July 2023:
Run
In[]:=
mars=AstroPosition[Entity["Planet","Mars"],{"Equatorial",#}]&/@DateRange["1 Jul 2022","1 July 2023","Week"];
Part of the trajectory was in retrograde motion:
Run
In[]:=
AstroGraphics[{White,Point[mars]},AstroReferenceFrame->"Equatorial"]

Scales in the Universe

Define an equation relevant at nanometer scales:
Run
In[]:=
equation=FormulaData[{"PlanckRadiationLaw","Wavelength"},{"T"->Quantity[5000,"Kelvins"],"λ"->Quantity[wl,"Nanometers"]}][[2,2]];
Plot the equation over a range of wavelengths:
Run
In[]:=
Plot[equation,{wl,200,5000},AxesLabel->{"Wavelength (nm)","Spectral radiance (W
-1
sr
-3
m
​)"}]
Explore properties of cosmological models of arbitrary composition:
Run
In[]:=
UniverseModelData[Quantity[10^9,"Parsecs"],<|"OmegaLambda"->0,"OmegaMatter"->0.8,"OmegaRadiation"->0.2,"HubbleH0"->Quantity[50,("Kilometers")/("Megaparsecs""Seconds")]|>]

Geography on Celestial Bodies

Interpret solar system features using natural language:
Run
In[]:=
feature=Interpreter["SolarSystemFeature"]["Sinai Planum"]
Generate a relief map of solar system features:
Run
In[]:=
GeoGraphics[GeoCenter->feature,GeoBackground->"ReliefMap",GeoRange->Quantity[1000,"Miles"]]