Function Repository Resource:

SkyChart

Source Notebook

Visualize the sky for a specified location, time and date

Contributed by: Jeff Bryant

ResourceFunction["SkyChart"][]

visualizes the sky for your current location and date.

ResourceFunction["SkyChart"][location]

visualizes the current sky for a specified location.

ResourceFunction["SkyChart"][date]

visualizes the sky for your location on a specified date.

ResourceFunction["SkyChart"][location, date]

visualizes the sky for a specified location and date.

ResourceFunction["SkyChart"][entity]

highlights the specified entity if it is above the horizon for your current location and date.

ResourceFunction["SkyChart"][entity,location]

highlights the specified entity if it is above the horizon for the specified location.

ResourceFunction["SkyChart"][entity,date]

highlights the specified entity if it is above the horizon for your current location on the specified date.

ResourceFunction["SkyChart"][entity,location,date]

highlights the specified entity if it is above the horizon for the specified location and date.

ResourceFunction["SkyChart"][{entity1,entity2,}, ]

highlights multiple entities.

Details and Options

Locations can be explicit GeoPosition specifications, or entities that support a "Position" property that returns a GeoPosition.
Background objects are labeled with tooltips.
ResourceFunction["SkyChart"] has the same options as Graphics, with the following additions and changes:
"ConstellationColor"GrayLevel[0.37]color to use for constellation lines
"ConstellationThickness"0.00114thickness to use for constellation lines
"Grid"Falsewhether to include the equatorial coordinate grid
"HighlightedConstellations"{}which constellation entities to include the boundaries of
"PlanetColor"RGBColor[0.5,0,0.5]color to use for background planets
"ShowConstellations"Truewhether to display constellation lines
"StarColor"RGBColor[0.1538,0.44126,1]color to use for background stars
"SunRadius"0.05radius to use for the disks of the Sun and Moon

Examples

Basic Examples (4) 

Visualize the current sky from your location:

In[1]:=
ResourceFunction["SkyChart"][]
Out[1]=

Visualize the current sky from a specified location:

In[2]:=
ResourceFunction["SkyChart"][
 Entity["City", {"Johannesburg", "Gauteng", "SouthAfrica"}]]
Out[2]=

Visualize the sky from a specified location and time and highlight Mizar:

In[3]:=
ResourceFunction["SkyChart"][Entity["Star", "Mizar"], GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}]]
Out[3]=

Visualize the sky from a specified location and time and highlight Polaris and Venus:

In[4]:=
ResourceFunction[
 "SkyChart"][{Entity["Planet", "Venus"], Entity["Star", "Polaris"]}, GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}]]
Out[4]=

Options (9) 

Visualize the sky with the equatorial coordinate grid visible:

In[5]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], "Grid" -> True]
Out[5]=

Visualize the sky with a different background color:

In[6]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], Background -> Black]
Out[6]=

Visualize the sky and highlight specific constellation boundaries:

In[7]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 10, 30}], "HighlightedConstellations" -> {Entity["Constellation", "Orion"], Entity["Constellation", "UrsaMajor"]}]
Out[7]=

Visualize the sky without constellation lines:

In[8]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], "ShowConstellations" -> False]
Out[8]=

Visualize the sky but make the Sun appear larger:

In[9]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], "SunRadius" -> .2]
Out[9]=

Visualize the sky with thicker constellation lines:

In[10]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], "ConstellationThickness" -> .01]
Out[10]=

Visualize the sky with green constellation lines:

In[11]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], "ConstellationColor" -> Green]
Out[11]=

Visualize the sky with green background stars:

In[12]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], "StarColor" -> Green]
Out[12]=

Visualize the sky with green background planets:

In[13]:=
ResourceFunction["SkyChart"][GeoPosition[{40.11, -88.22}], DateObject[{2020, 8, 4, 15, 30}], "PlanetColor" -> Green]
Out[13]=

Possible Issues (2) 

If an object is below the horizon, it returns a Missing value:

In[14]:=
ResourceFunction["SkyChart"][Entity["Star", "SigmaOctantis"]]
Out[14]=

Trying to visualize the Earth in the night sky returns a Missing value:

In[15]:=
ResourceFunction["SkyChart"][Entity["Planet", "Earth"]]
Out[15]=

Version History

  • 3.0.0 – 03 September 2020
  • 2.0.0 – 25 August 2020
  • 1.0.0 – 19 August 2020

Related Resources

License Information