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:
PlotRange18 Degreeangular 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"Brownstyle to use for the ecliptic
"EntityColor"Redcolor to use to indicate the specified entity
"EntityRadius".01radius of the entity indicator in radians
"GridStyle"LightGraystyle to use for rendering the equatrorial coordinate grid
"Grid"Truewhether to include the equatorial coordinate grid
"IncludeMoon"Truewhether to include the Moon as a background object
"IncludePlanets"Truewhether to include background planets
"IncludeSun"Truewhether to include the Sun as a background object
"MoonMagnificationFactor"4magnification factor applied to the Moon's visible size
"PlanetColor"Purplecolor to use for background planets
"ShowEcliptic"Truewhether to include the ecliptic
"ShowEntityLabel"Truewhether to include the entity label
"StarColor"RGBColor[.1538,.44126,1]color to use for background stars
"SunMagnificationFactor"4magnification factor applied to the Sun’s visible size

Examples

Basic Examples (5) 

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 (23) 

ConstellationLineStyle (1) 

Change the color of the constellation lines:

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

EclipticStyle (1) 

Change the color of the ecliptic:

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

EntityColor (1) 

Change the color of the entity indicator:

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

EntityRadius (1) 

Change the radius of the entity indicator:

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

Grid (2) 

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 (1) 

Change the style of the coordinate grid:

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

IncludeMoon (2) 

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 (2) 

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 (2) 

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 (3) 

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 (1) 

Change the color of background planets:

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

ShowEcliptic (1) 

Turn off the ecliptic marker line:

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

ShowEntityLabel (1) 

Turn off the entity label:

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

StarColor (1) 

Change the color of the background stars:

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

SunMagnificationFactor (3) 

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 (2) 

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]=

Version History

  • 2.0.0 – 21 August 2020
  • 1.0.0 – 24 July 2020

Related Resources

License Information