Function Repository Resource:

AstroAngularDistance

Source Notebook

Compute the angular distance between astronomical entities

Contributed by: Jeff Bryant

ResourceFunction["AstroAngularDistance"][entity1,entity2]

computes the current angular distance between entity1 and entity2.

ResourceFunction["AstroAngularDistance"][entity1,entity2,date]

computes the angular distance between entity1 and entity2 on the specified date.

ResourceFunction["AstroAngularDistance"][entity1,entity2,{date1,date2,,daten}]

computes the angular distance between entity1 and entity2 on multiple dates.

Details and Options

Valid domains for entities or entity classes can be from any of "Planet", "PlanetaryMoon", ”MinorPlanet", ”Comet", ”Exoplanet", ”Star", ”StarCluster", ”Nebula", ”Galaxy", ”Supernova", ”Pulsar" or ”AstronomicalRadioSource".
date must be a DateObject.
Shorter dates can be used: DateObject[{y}] is equivalent to DateObject[{y,1,1,0,0,0}], DateObject[{y,m}] to DateObject[{y,m,1,0,0,0}], etc.
For a list of dates, the result is returned as a TimeSeries.
Angular distances are returned in angular degrees by default.
Entities found in the solar solar system return results that change with time.
Angular distances to extra‐solar system objects are computed for a fixed epoch and ignore effects such as proper motion and precession.

Examples

Basic Examples (3) 

Compute the current angular distance between two objects:

In[1]:=
ResourceFunction["AstroAngularDistance"][Entity["Star", "Mizar"], Entity["Star", "Alcor"]]
Out[1]=
In[2]:=
ResourceFunction["AstroAngularDistance"][Entity["Galaxy", "M31"], Entity["Galaxy", "M32"]]
Out[2]=

Compute the angular distance between two objects on a specified date:

In[3]:=
ResourceFunction["AstroAngularDistance"][Entity["Planet", "Venus"], Entity["Planet", "Jupiter"], DateObject[{2019, 1, 21}]]
Out[3]=

Compute the angular distance between two objects over a range of dates:

In[4]:=
angles = ResourceFunction["AstroAngularDistance"][
  Entity["Planet", "Venus"], Entity["Planet", "Jupiter"], DateRange[DateObject[{2019, 11, 1}], DateObject[{2019, 12, 31}], 1]]
Out[4]=
In[5]:=
DateListPlot[angles]
Out[5]=

Scope (1) 

Entities can be in different domains:

In[6]:=
ResourceFunction["AstroAngularDistance"][Entity["Planet", "Mars"], Entity["Star", "Sun"]]
Out[6]=

Options (1) 

The units returned by AstroAngularDistance can be chosen using the option TargetUnits:

In[7]:=
ResourceFunction["AstroAngularDistance"][Entity["Star", "Mizar"], Entity["Star", "Alcor"], TargetUnits -> "ArcMinutes"]
Out[7]=

Possible Issues (1) 

Since angles are measures as viewed from Earth, Earth itself cannot be included as one of the entities:

In[8]:=
ResourceFunction["AstroAngularDistance"][Entity["Planet", "Mars"], Entity["Planet", "Earth"]]
Out[8]=

Version History

  • 2.0.0 – 06 January 2021
  • 1.0.0 – 25 July 2019

Related Resources

License Information