Wolfram Astronomy

José Martín-García & Jeff Bryant, Wolfram

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

Abstract

This talk presents new Wolfram Astronomy functions to compute dates of relevant astronomical events, such as rise, set, equinox, solstice, conjunction, periapsis, and many others. We also present a new BlackHole Entity-type and Wolfram Function Repository items for solar imagery and videos.

Outline

1. AstroRiseSet

2. FindAstroEvent

3. Data and Additional Resources

1. New in 14.1: AstroRiseSet

1.1. Syntax

General case:

AstroRiseSet[object,event,loc,date]

Special case. Assume date is Now:

AstroRiseSet[object,event,loc]

Special case. Assume loc is Here:

AstroRiseSet[object,event]

1.2. Nomenclature and Definitions

General situation in the Northern Hemisphere:

AstroRiseSet can compute dates for four events:

	“Rise”
	“Set”
	“UpperCulmination”
	“LowerCulmination”

1.3. Examples with the Moon

1.3.1. Rising and Setting

Next rising and setting of the Moon:

moonrise=AstroRiseSet[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),"Rise"]

moonset=AstroRiseSet[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),"Set"]

Observe from a different location:

AstroRiseSet[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),"Rise",(Entity["Paris", Entity["City",{"Paris","IleDeFrance","France"}], "Entity[\"City\", {\"Paris\", \"IleDeFrance\", \"France\"}]", "city"])]

AstroRiseSet[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),"Rise",(Entity["Paris", Entity["City",{"Paris","IleDeFrance","France"}], "Entity[\"City\", {\"Paris\", \"IleDeFrance\", \"France\"}]", "city"]),TimeZone->"Europe/Paris"]

Observe from a different location and on a different date:

AstroRiseSet[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),"Rise",(Entity["Paris", Entity["City",{"Paris","IleDeFrance","France"}], "Entity[\"City\", {\"Paris\", \"IleDeFrance\", \"France\"}]", "city"]),DateObject[{2025,1,1}]]

1.3.2. Reference Altitude: Limbs

By default, rising dates correspond to the instant where the upper limb (not the center) of the object crosses the horizon on its way up. Therefore the center of the object actually has negative altitude:

moonrise

AstroPosition[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),moonrise]

AstroGraphics[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),AstroReferenceFrame->moonrise,AstroRange->Quantity[1,"AngularDegrees"]]

Specify a different reference altitude to compute rise and set:

moonriseC=AstroRiseSet[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),"Rise",ReferenceAltitude->"Center"]

moonriseC-moonrise

AstroPosition[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),moonriseC]

AstroGraphics[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),AstroReferenceFrame->moonriseC,AstroRange->Quantity[1,"AngularDegrees"]]

Compute rise time using the lower limb:

moonriseL=AstroRiseSet[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),"Rise",ReferenceAltitude->"LowerLimb"]

moonriseL-moonrise

AstroPosition[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),moonriseL]

AstroGraphics[(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"]),AstroReferenceFrame->moonriseL,AstroRange->Quantity[1,"AngularDegrees"]]

1.4. Examples with the Sun

1.4.1. Rising and Setting

Next rising and setting of the Sun:

sunrise=AstroRiseSet[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),"Rise"]

sunset=AstroRiseSet[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),"Set"]

We already have dedicated functions for the Sun:

Sunrise[]

Sunset[]

1.4.2. Reference Altitude: Twilight

Compute twilight times, defined as follows:

sunset=Sunset[ReferenceAltitude->"Center"]

Civil twilight: The center of the Sun is at altitude -6 degrees:

civil=Sunset[ReferenceAltitude->"Civil"]

Nautical twilight: The center of the Sun is at altitude -12 degrees:

nautical=Sunset[ReferenceAltitude->"Nautical"]

Astronomical twilight: The center of the Sun is at altitude -18 degrees:

astronomical=Sunset[ReferenceAltitude->"Astronomical"]

Differences[{sunset,civil,nautical,astronomical}]

1.4.3. Upper and Lower Culminations

Instant when the Sun is highest in the sky as observed from our location, corresponding to local solar noon:

Uculmination=AstroRiseSet[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),"UpperCulmination"]

AstroPosition[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),Uculmination]

SolarTime[Uculmination]

Manipulate[AstroGraphics[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),AstroReferenceFrame->Uculmination+Quantity[t,"Hours"],AstroRange->{{90,270},{-5,90}},AstroGridLines->Automatic,AstroProjection->{"Stereographic","Centering"->{0,180}},AstroBackground->AstroStyling[{"BlackSky","ShowConstellations"->None}],ImageSize->Medium],{{t,0},-12,12},SaveDefinitions->True]

Instant when the Sun is lowest in the sky as observed from our location, corresponding to local solar midnight:

AstroRiseSet[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),"LowerCulmination"]

1.5. Observe from Other Bodies

Mars also rises and sets from a location on the Moon:

interval=DateInterval[{{2024,1,1},{2024,12,31}}]

AstroRiseSet[(Entity["Mars", Entity["Planet","Mars"], "Entity[\"Planet\", \"Mars\"]", "planet"]),{"Rise","Set"},GeoPosition[{0,0},"Moon"],interval]

The Earth does not rise or set from a central location on the visible side of the Moon:

AstroRiseSet[(Entity["Earth", Entity["Planet","Earth"], "Entity[\"Planet\", \"Earth\"]", "planet"]),{"Rise","Set"},GeoPosition[{0,0},"Moon"],interval]

However, locations near the border of the visible side do see the Earth rising and setting, due to libration:

AstroRiseSet[(Entity["Earth", Entity["Planet","Earth"], "Entity[\"Planet\", \"Earth\"]", "planet"]),{"Rise","Set"},GeoPosition[{0,88},"Moon"],interval]

2. New in 14.2: FindAstroEvent

2.1. Syntax

General case:

FindAstroEvent[event,date,loc]

Special case. Assume loc is Here:

FindAstroEvent[event,date]

Special case. Assume date is Now:

FindAstroEvent[event]

2.2. Equinoxes and Solstices

Next solstices and equinoxes:

FindAstroEvent["DecemberSolstice"]

meq=FindAstroEvent["MarchEquinox"]

FindAstroEvent["JuneSolstice"]

FindAstroEvent["SeptemberEquinox"]

Visualize what happens during a year:

Manipulate[AstroGraphics[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),AstroReferenceFrame->{"Equatorial",meq+(Quantity[m, "mo", months, "Months"])},AstroRange->(QuantityPostfix[25, "°", degrees, "AngularDegrees"]),ImageSize->Medium],{m,0,12}]

During the current decade:

data=FindAstroEvent[{"MarchEquinox","JuneSolstice","SeptemberEquinox","DecemberSolstice"},DateInterval[{{2021},{2030}}],TimeZone->0];

ToTabular[GroupBy[data,Last->First],"Columns"]

2.3. Conjunctions, Oppositions and Quadratures

2.3.1. With the Sun

Find the next conjunction of Jupiter with the Sun:

FindAstroEvent[{"Conjunction",(Entity["Jupiter", Entity["Planet","Jupiter"], "Entity[\"Planet\", \"Jupiter\"]", "planet"])}]

Find the next opposition of Jupiter with respect to the Sun:

FindAstroEvent[{"Opposition",(Entity["Jupiter", Entity["Planet","Jupiter"], "Entity[\"Planet\", \"Jupiter\"]", "planet"])}]

Find the next western quadrature of Jupiter:

FindAstroEvent[{"WesternQuadrature",(Entity["Jupiter", Entity["Planet","Jupiter"], "Entity[\"Planet\", \"Jupiter\"]", "planet"])}]

Find the next eastern quadrature of Jupiter:

FindAstroEvent[{"EasternQuadrature",(Entity["Jupiter", Entity["Planet","Jupiter"], "Entity[\"Planet\", \"Jupiter\"]", "planet"])}]

The Huygens probe was able to see this transit of the Earth:

iconj=FindAstroEvent[{"InferiorConjunction",(Entity["Earth", Entity["Planet","Earth"], "Entity[\"Planet\", \"Earth\"]", "planet"])},(DateObject["Year: ""2005", DateObject[{2005},"Year"]]),(Entity["Saturn", Entity["Planet","Saturn"], "Entity[\"Planet\", \"Saturn\"]", "planet"])]

Manipulate[AstroGraphics[(Entity["Sun", Entity["Star","Sun"], "Entity[\"Star\", \"Sun\"]", "star"]),AstroRange->(QuantityPostfix[3, "'", arcminutes, "Arcminutes"]),AstroReferenceFrame->{"Ecliptic",iconj+(Quantity[t, "h", hours, "Hours"]),(Entity["Saturn", Entity["Planet","Saturn"], "Entity[\"Planet\", \"Saturn\"]", "planet"])},ImageSize->300],{t,-6,6}]

2.3.2. Between Two Bodies

Find the next conjunction of Venus and Jupiter, as observed from Earth:

conj=FindAstroEvent[{"Conjunction",(Entity["Venus", Entity["Planet","Venus"], "Entity[\"Planet\", \"Venus\"]", "planet"]),(Entity["Jupiter", Entity["Planet","Jupiter"], "Entity[\"Planet\", \"Jupiter\"]", "planet"])}]

They will have the same ecliptic longitude on that instant:

AstroPosition[(Entity["Venus", Entity["Planet","Venus"], "Entity[\"Planet\", \"Venus\"]", "planet"]),{"Ecliptic",conj}]

AstroPosition[(Entity["Jupiter", Entity["Planet","Jupiter"], "Entity[\"Planet\", \"Jupiter\"]", "planet"]),{"Ecliptic",conj}]

2.4. Distance Events

Minimum distance between a orbiting body and its orbit center:

FindAstroEvent[{"Periapsis",(Entity["Mercury", Entity["Planet","Mercury"], "Entity[\"Planet\", \"Mercury\"]", "planet"])}]

Specific names for specific orbit centers:

FindAstroEvent[{"Perihelion",(Entity["Earth", Entity["Planet","Earth"], "Entity[\"Planet\", \"Earth\"]", "planet"])}]

FindAstroEvent[{"Perigee",(Entity["Moon", Entity["PlanetaryMoon","Moon"], "Entity[\"PlanetaryMoon\", \"Moon\"]", "planetary moon"])}]

FindAstroEvent[{"Perijove",(Entity["Callisto", Entity["PlanetaryMoon","Callisto"], "Entity[\"PlanetaryMoon\", \"Callisto\"]", "planetary moon"])}]

FindAstroEvent[{"Periposeideum",(Entity["Triton", Entity["PlanetaryMoon","Triton"], "Entity[\"PlanetaryMoon\", \"Triton\"]", "planetary moon"])}]

Maximum distance is called “apoapsis”:

FindAstroEvent[{"Apoapsis",(Entity["Earth", Entity["Planet","Earth"], "Entity[\"Planet\", \"Earth\"]", "planet"])}]

FindAstroEvent[{"Aphelion",(Entity["Earth", Entity["Planet","Earth"], "Entity[\"Planet\", \"Earth\"]", "planet"])}]

2.5. Angular Separation Events

Minimal angular separation between two bodies:

appulses=FindAstroEvent[{"Separation","Jupiter","Saturn","LocalMinimum"},DateInterval[{{2010},{2035}}]]

Plot[AstroAngularSeparation["Jupiter","Saturn",Dated["Earth",year]],{year,2010, 2035},GridLines->{DateValue[appulses,"YearExact"]},ImageSize->Medium]

Find the absolute minimum:

date=FindAstroEvent[{"Separation","Jupiter","Saturn","AbsoluteMinimum"},DateInterval[{{2010},{2035}}]]

AstroGraphics[{(Entity["Jupiter", Entity["Planet","Jupiter"], "Entity[\"Planet\", \"Jupiter\"]", "planet"]),(Entity["Saturn", Entity["Planet","Saturn"], "Entity[\"Planet\", \"Saturn\"]", "planet"])},AstroReferenceFrame->{"Equatorial",date},AstroRange->(QuantityPostfix[5, "'", arcminutes, "Arcminutes"]),AstroGridLines->(QuantityPostfix[1, "'", arcminute, "Arcminutes"]),ImageSize->Medium]

3. Data and Additional Resources

3.1. BlackHole Entity-type

Support for black holes has been around for awhile, but basically as purely theoretical constructs. Alpha supports these theoretical constructs and we also have Wolfram Function Repository support.

["KerrNewman","Temperature",{"M"->Quantity[10,"SolarMass"],"J"->Quantity[0,"Joules" "Seconds"],"Q"->Quantity[0,"Coulombs"]}]

Coming soon is a new entity-type containing data for many known black holes ranging from stellar-mass black holes to supermassive black holes.

EntityValue["BlackHole","Properties"]

Their position can be plotted using AstroGraphics:

AstroGraphics[
{Red,Point[EntityList["BlackHole"]]},
AstroReferenceFrame->"Equatorial",
AstroRange->{{-180, 180}, {-90, 90}},
AstroBackground->"GalacticSky",ImageSize->500]

You can query for black holes meeting certain criteria:

EntityClass["BlackHole",{(EntityProperty["distance from Earth", EntityProperty["BlackHole","DistanceFromEarth"], "EntityProperty[\"BlackHole\", \"DistanceFromEarth\"]"])->TakeSmallest[1]}]//EntityList

Star systems containing black holes can be explored:

UnitConvert[EntityValue[(Entity["V Puppis", Entity["Star","HIP38957"], "Entity[\"Star\", \"HIP38957\"]", "star"])["SystemMembers"],"Mass"],"SolarMass"]

3.2. Wolfram Function Repository: SolarImage

SolarImage is a Wolfram Function Repository item that has existed since July of 2023 with several updates since then. It relies on the Helioviewer API call to obtain 4K images.

By default SolarImage returns the current view of the Sun including any sunspots that might be present:

ResourceFunction["SolarImage"][]

Images on other dates can be retrieved:

ResourceFunction["SolarImage"][DateObject[{2024,10,9,1,55},TimeZone->0]]

Solar flares can be observed by specifying other instruments:

ResourceFunction["SolarImage"][DateObject[{2024,10,9,1,55},TimeZone->0],9]

Images over a range of dates can be returned as an EventSeries:

dr=DateRange[DateObject[{2024,10,9,1,30},TimeZone->0],DateObject[{2024,10,9,2,30},TimeZone->0],Quantity[10,"Minutes"]];

ResourceFunction["SolarImage"][dr,9]

3.3. Wolfram Function Repository: SolarVideo

Rather than trying to assemble a video from the EventSeries returned by SolarImage manually. SolarVideo does the work for you.

dr=DateRange[DateObject[{2024,10,9,1,30},TimeZone->0],DateObject[{2024,10,9,2,30},TimeZone->0],Quantity[10,"Minutes"]];

ResourceFunction["SolarVideo"][dr,9]

Some Homework:  Observe Comet C/2023 A3

Comet C/2023 A3 can be found in the western skies after sunset. The following shows how to find the comet at evening civil twilight

loc=(Entity["Champaign", Entity["City",{"Champaign","Illinois","UnitedStates"}], "Entity[\"City\", {\"Champaign\", \"Illinois\", \"UnitedStates\"}]", "city"]);
date=DateObject[{2024,10,17}];

civilset=Sunset[loc,date,ReferenceAltitude->"Civil"]

ecliptic={"Ecliptic",civilset,"Sun"};
horizon={"Horizon",civilset,loc};
ap=AstroPosition[(Entity["C/2023 A3 (Tsuchinshan-ATLAS)", Entity["Comet","CometC2023A3TsuchinshanATLAS"], "Entity[\"Comet\", \"CometC2023A3TsuchinshanATLAS\"]", "comet"]),ecliptic,"Cartesian"];
azimuth=AstroPosition[ap,horizon]["Azimuth"]

comet=Line[{ap,MapAt[1.1#&,ap,1]}];

AstroGraphics[{White,Thickness[.002],comet,Text["C/2023 A3",ap,{-1.2,0}],Point[ap]},AstroReferenceFrame->horizon,AstroRange->{azimuth+{-45,45},{-5,60}},AstroProjection->{"Stereographic","Centering"->{0,azimuth}},AstroGridLines->Automatic,ImageSize->500]

Additional Resources

Talk: Projects from Wolfram Student Leadership Programs (Friday October 18th at 11am)

SolarImage

SolarVideo

AstroGraphics

AstroPosition

AstroRiseSet

Astronomical Computation & Data