Wolfram Research

Function Repository Resource:

SkyPositionChart

Source Notebook

Visualize the position of astronomical objects on the celestial sphere

Contributed by: Jeff Bryant

ResourceFunction["SkyPositionChart"][entity]

visualize the current position of entity.

ResourceFunction["SkyPositionChart"][entity,date]

visualize the current position of entity on the specified date.

ResourceFunction["SkyPositionChart"][entity,{date1,date2,}]

visualize the current position of entity on the specified dates.

ResourceFunction["SkyPositionChart"][<|"RightAscension"ra,"Declination"dec|>]

visualize the position of the specified coordinates.

Details and Options

Results are oriented using celestial equatorial coordinates with north up.
PlotRange is set to 18° by default, or 36° across the whole field.
To reduce the data to be plotted, only data slightly beyond the default PlotRange is included so increasing the PlotRange will not include more data.
ResourceFunction["SkyPositionChart"][] is equivalent to ResourceFunction["SkyPositionChart"][Entity["Star","Sun"]].
Background objects are labeled with tooltips.
If coordinates are specified without units, units for right ascension and declination are assumed to be in "HoursOfRightAscension" and "AngularDegrees", respectively.
ResourceFunction["SkyPositionChart"] has the same options as Graphics, with the following additions and changes:
PlotRange 18 Degree angular measure from center to the edge of the field
"ConstellationLineStyle" Directive[RGBColor[1,0.78,5/9],AbsoluteThickness[1]] style to use for constellation lines
"EclipticStyle" Brown style to use for the ecliptic
"EntityColor" Red color to use to indicate the specified entity
"EntityRadius" .01 radius of the entity indicator in radians
"GridStyle" LightGray style to use for rendering the equatrorial coordinate grid
"Grid" True whether to include the equatorial coordinate grid
"IncludeMoon" True whether to include the Moon as a background object
"IncludePlanets" True whether to include background planets
"IncludeSun" True whether to include the Sun as a background object
"MoonMagnificationFactor" 4 magnification factor applied to the Moon's visible size
"PlanetColor" Purple color to use for background planets
"ShowEcliptic" True whether to include the ecliptic
"ShowEntityLabel" True whether to include the entity label
"StarColor" RGBColor[.1538,.44126,1] color to use for background stars
"SunMagnificationFactor" 4 magnification factor applied to the Sun’s visible size

Examples

Basic Examples

Find the position of an entity in the sky:

In[1]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Polaris"]]
Out[1]=

Find the current position of an entity whose position changes with time:

In[2]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Jupiter"]]
Out[2]=

Find the position of an entity on a given date:

In[3]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Jupiter"], DateObject[{1979, 5, 6}]]
Out[3]=

Find the position of an entity over a range of dates:

In[4]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mars"], DateRange[DateObject[{2020, 7, 15}], DateObject[{2021, 1, 1}], Quantity[2, "Days"]], "ShowEntityLabel" -> False, "EntityRadius" -> .004, "IncludeMoon" -> False, "IncludePlanets" -> False, "IncludeSun" -> False]
Out[4]=

Find the position of specified celestial equatorial coordinates, right ascension and declination:

In[5]:=
ResourceFunction[
 "SkyPositionChart"][<|
  "RightAscension" -> Quantity[13.8, "HoursOfRightAscension"], "Declination" -> Quantity[49.2, "AngularDegrees"]|>]
Out[5]=

Options

ConstellationLineStyle

Change the color of the constellation lines:

In[6]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Betelgeuse"], "ConstellationLineStyle" -> Black]
Out[6]=

EclipticStyle

Change the color of the ecliptic:

In[7]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Spica"], "EclipticStyle" -> Directive[Blue, Thickness[.01]]]
Out[7]=

EntityColor

Change the color of the entity indicator:

In[8]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Zubenelgenubi"], "EntityColor" -> Green]
Out[8]=

EntityRadius

Change the radius of the entity indicator:

In[9]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Zubeneshamali"], "EntityRadius" -> .05]
Out[9]=

Grid

The equatorial coordinate grid is included by default:

In[10]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "SigmaOctantis"]]
Out[10]=

But the coordinate grid can be turned off:

In[11]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "SigmaOctantis"], "Grid" -> False]
Out[11]=

GridStyle

Change the style of the coordinate grid:

In[12]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "SigmaOctantis"], "GridStyle" -> Directive[LightBlue, Thickness[.01]]]
Out[12]=

IncludeMoon

By default, the Moon is included as a background object:

In[13]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mars"], DateObject[{2020, 7, 11}]]
Out[13]=

But the Moon can be removed from the scene if it is not of interest:

In[14]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mars"], DateObject[{2020, 7, 11}], "IncludeMoon" -> False]
Out[14]=

IncludeSun

By default, the Sun is included as a background object:

In[15]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Pollux"], DateObject[{2020, 7, 10}]]
Out[15]=

But the Sun can be removed from the scene if it is not of interest:

In[16]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Pollux"], DateObject[{2020, 7, 10}], "IncludeSun" -> False]
Out[16]=

IncludePlanets

By default, the planets visible to the naked eye, such as those during the conjunction shown, are included as background objects:

In[17]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Diphda"], DateObject[{2022, 4, 30}]]
Out[17]=

But the planets can be removed from the scene if they are not of interest:

In[18]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Diphda"], DateObject[{2022, 4, 30}], "IncludePlanets" -> False]
Out[18]=

MoonMagnificationFactor

By default, the Moon is magnified to make it easier to see:

In[19]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mars"], DateObject[{2020, 7, 11}]]
Out[19]=

Change the magnification to make it more natural (the Moon looks fairly small with such a wide field of view):

In[20]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mars"], DateObject[{2020, 7, 11}], "MoonMagnificationFactor" -> 1]
Out[20]=

Change the magnification to make it larger:

In[21]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mars"], DateObject[{2020, 7, 11}], "MoonMagnificationFactor" -> 8]
Out[21]=

PlanetColor

Change the color of background planets:

In[22]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Aldebaran"], DateObject[{2020, 6, 1}], "PlanetColor" -> Blue]
Out[22]=

ShowEcliptic

Turn off the ecliptic marker line:

In[23]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Aldebaran"], DateObject[{2020, 6, 1}], "ShowEcliptic" -> False]
Out[23]=

ShowEntityLabel

Turn off the entity label:

In[24]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Rigel"], "ShowEntityLabel" -> False]
Out[24]=

StarColor

Change the color of the background stars:

In[25]:=
ResourceFunction["SkyPositionChart"][Entity["Star", "Algenib"], "StarColor" -> Gray]
Out[25]=

SunMagnificationFactor

By default, the Sun is magnified to make it easier to see:

In[26]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mercury"], DateObject[{2020, 7, 9}]]
Out[26]=

Change the magnification to make it more natural (the Sun looks very small with such a wide field of view):

In[27]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mercury"], DateObject[{2020, 7, 9}], "SunMagnificationFactor" -> 1]
Out[27]=

Change the magnification to make it larger:

In[28]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Mercury"], DateObject[{2020, 7, 9}], "SunMagnificationFactor" -> 8]
Out[28]=

Possible Issues

The Earth has no sky coordinates as seen from Earth so is not applicable:

In[29]:=
ResourceFunction["SkyPositionChart"][Entity["Planet", "Earth"]]
Out[29]=

Other types of entities are also not applicable:

In[30]:=
ResourceFunction["SkyPositionChart"][Entity["Element", "Hydrogen"]]
Out[30]=

Resource History

Related Resources

License Information