Introducing Astro Computation

José Martín-García, Jeff Bryant, Truman Tapia
Wolfram Research

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

ABSTRACT

This talk introduces some basic elements of the Astro framework in WL: the new language of time systems for precise control of time, as well as  a collection of  Wolfram Repository Functions on computational, visualization and data gathering aspects of Astronomy.

OUTLINE

1. Improved Control of Time

2. Wolfram Function Repository Astro Computation

3. Wolfram Function Repository Astro Data

1. Improved Control of Time

1.1. New Option in DateObject (and JulianDate): TimeSystem

• This is an important instant in Astronomy:

J2000=DateObject[{2000,1,1,12,0,0},TimeSystem->"TT"]

• Time systems are a new independent freedom in WL dates:

InputForm[J2000]

• Convert to the standard civil UTC time system:

TimeSystemConvert[J2000,"UTC"]

%//InputForm

• Convert to atomic time TAI:

TimeSystemConvert[J2000,"TAI"]

• Those are all different representations of the same instant.

• J2000 is the origin of precession computations:

GeoOrientationData[J2000,"PrecessionMatrix"]

GeoOrientationData[DateObject[{2000,1,1,12,0,0},TimeSystem->"UTC"],"PrecessionMatrix"]

1.2. Possible Time Systems

• Seven main choices:

• “TAI”: atomic time, as measured by atomic clocks at Earth’s surface.

• “UT1”: universal time, determined by the rotation of the Earth.

• “UTC”: an integer second shift of “TAI”, within 0.9s of “UT1”.

• “TT”: terrestrial time, defined as TT = TAI + 32.184 s.

• “TCG”: time at the center of the Earth, with no gravitational field.

• “TCB”: time at the solar system barycenter, with no gravitational field.

• “TDB”: correct TCB to follow TT on average. NASA/JPL’s ephemeris time.

now=Now

TimeSystemConvert[now,#]&/@{"TAI","UT1","UTC","TT","TCG","TCB","TDB"}

Differences[%]

• Difference between TT and TDB last year, in seconds:

datelists=DateRange[{2020,10,13},{2021,10,13}];

diffs=(DateObject[#,TimeSystem->"TT"]-DateObject[#,TimeSystem->"TDB"])&/@datelists;

Transpose[{datelists,diffs}]//DateListPlot

1.3. Leap Seconds in the UTC time system

• This is the difference between TAI and UT1, in seconds:

GeoOrientationData[Now,"TAIMinusUT1"]

Since 1960:

dates=DateRange[DateObject[{1960,1,1}],Today,"Month"];
dt=GeoOrientationData[dates,"TAIMinusUT1"]

plot1=DateListPlot[Transpose[{dates,dt}]]

Displace it up and down by 0.9 seconds:

plot2=DateListPlot[{
Transpose[{dates,dt-Quantity[0.9,"Seconds"]}],
Transpose[{dates,dt+Quantity[0.9,"Seconds"]}]
},PlotStyle->Blue]

This is the difference between TAI and UTC:

GeoOrientationData[Now,"TAIMinusUTC"]

leap=GeoOrientationData[dates,"TAIMinusUTC"]

plot3=DateListPlot[Transpose[{dates,leap}],PlotStyle->Red]

Show[plot1,plot2,plot3,ImageSize->Large]

• Last leap second added to UTC at the end of 2016 in the GMT time zone:

DateRange[{2017,1,1,0,0,35},{2017,1,1,0,0,38},Quantity[0.5,"Seconds"]]

DateObject[#,TimeSystem->"TAI",DateFormat->{"DateTime",".","Millisecond"}]&/@%

DateObject[TimeSystemConvert[#,"UTC"],DateFormat->{"DateTime",".","Millisecond"}]&/@%

1.4. New Calendars

now=Now

• Gregorian years have 365.2425 days.

CalendarConvert[now,"GregorianYear"]

CalendarConvert[DateObject[{2021,1,1,0,0,0}],"GregorianYear"]

CalendarConvert[DateObject[{2000,1,1,0,0,0}],"GregorianYear"]

• Julian years have 365.25 days.

CalendarConvert[now,"JulianYear"]

CalendarConvert[DateObject[{2020,1,1,12,0,0}],"JulianYear"]

CalendarConvert[DateObject[{2000,1,1,12,0,0}],"JulianYear"]

• Besselian years duration is an average tropical year.

CalendarConvert[now,"BesselianYear"]

DateObject[{1950},CalendarType->"BesselianYear",TimeSystem->"TT"]

CalendarConvert[%,"Gregorian"]

2. Wolfram Function Repository Astro Computation

Wolfram Alpha often has custom graphics or results that are not part of the Wolfram Language. To allow these to be exposed in the Wolfram Language, a number of Wolfram Function Repository items have been added. Natural language queries are often attached to these so its easier to access them.

2.1. Wolfram Language Forms

[DateObject[{2021, 10, 6}, TimeObject[{20}, TimeZone -> "America/Chicago"]], "Graphics3D"]

[]

[]

[]

[(Entity["Orion", Entity["Constellation","Orion"], "Entity[\"Constellation\", \"Orion\"]", "constellation"])]

2.2. Natural Language Forms

• If you forget the Wolfram Language form, many of these are accessible via natural language to help get you started.

LinguisticAssistant

LinguisticAssistant

LinguisticAssistant

LinguisticAssistant

• Support for natural language doesn’t just apply to exposure of Wolfram Function Repository items, it can be a quick way to explore functionality built in to the Wolfram Language.

LinguisticAssistant

LinguisticAssistant

LinguisticAssistant

3. Wolfram Function Repository Astro Data

3.1. SIMBADIdentifiers

• SIMBAD is a database with more than 12 million astronomical objects. The function ({{"[◼]", "SIMBADIdentifiers" }}) returns all the identifiers stored by SIMBAD for a given astronomical object.

• Get the identifiers (or alternate names) of (Entity["Altair", Entity["Star","Altair"], "Entity[\"Star\", \"Altair\"]", "star"]):

({{"[◼]", "SIMBADIdentifiers" }})[(Entity["Altair", Entity["Star","Altair"], "Entity[\"Star\", \"Altair\"]", "star"])]

Length[%]

3.2. SIMBADData

• The function  extracts basic information from SIMBAD for astronomical objects. One can use this function as an extension of the Wolfram Knowledge database in the field of astronomy.

• Example:

[(Entity["Nenque", Entity["Star","HIP5054"], "Entity[\"Star\", \"HIP5054\"]", "star"]),{"RightAscensionWithUncertainty","DeclinationWithUncertainty"}]

["Altair",{"RightAscensionWithUncertainty","DeclinationWithUncertainty"}]

• List of available properties:

["Properties"]//Shallow

• Objects inside a circle centered at (Entity["Sagittarius A*", Entity["AstronomicalRadioSource","SagittariusAStar"], "Entity[\"AstronomicalRadioSource\", \"SagittariusAStar\"]", "astronomical radio source"]) with a radius of (QuantityPostfix[0.5, "\"", arc second, "ArcSeconds"]):

[\[LeftAssociation]"AstroCenter"->(Entity["Sagittarius A*", Entity["AstronomicalRadioSource","SagittariusAStar"], "Entity[\"AstronomicalRadioSource\", \"SagittariusAStar\"]", "astronomical radio source"]),"AstroRange"->(QuantityPostfix[0.5, "\"", arc second, "ArcSeconds"])\[RightAssociation],{"RightAscension","Declination","ObjectTypes"},"Dataset"]

3.3. VizierCatalogData

• VizieR is a library with more than 20 000 astronomical catalogs. The function  gets catalogs from VizieR.

• Search catalogs matching a keyword like “Hipparcos”:

["Hipparcos","Title"]

I/239/hip_main is the id of the traditional Hipparcos catalog.

We can get this catalog by doing:

["I/239/hip_main"]

• We can search information inside a catalog. For example, take the Hipparcos number of a star:

hipNumber=(Entity["Nenque", Entity["Star","HIP5054"], "Entity[\"Star\", \"HIP5054\"]", "star"])["HipparcosNumber"]

Then look for this star in the Hipparcos catalog using its number:

["I/239/hip_main","Filter"->Select[#HIP==hipNumber&]]

• VizieR has some very large catalogs, for example the Gaia Early Data Release 3 with 1.8 billion objects:

["I/350/gaiaedr3","CatalogSize"]

And we can get the data from this catalog:

["I/350/gaiaedr3",MaxItems->100]

3.4. SkyViewImage

• SkyView is a Virtual Observatory generating images of any part of the sky at wavelengths in all regimes from Radio to Gamma-Ray.  gets images form the SkyView web service.

• Get an image of the galaxy (Entity["M87", Entity["Galaxy","M87"], "Entity[\"Galaxy\", \"M87\"]", "galaxy"]):

[(Entity["M87", Entity["Galaxy","M87"], "Entity[\"Galaxy\", \"M87\"]", "galaxy"])]

• We can obtain FITS images as well:

[(Entity["Altair", Entity["Star","Altair"], "Entity[\"Star\", \"Altair\"]", "star"]),{"FITS","Image"},"AngularSize"->{(QuantityPostfix[15, "'", arc minutes, "ArcMinutes"]),(QuantityPostfix[15, "'", arc minutes, "ArcMinutes"])}][1]//ImageAdjust

• Get the GIF image of (Entity["M88", Entity["Galaxy","M88"], "Entity[\"Galaxy\", \"M88\"]", "galaxy"]) from the Sloan Digital Sky Survey b-band DR7:

[(Entity["M88", Entity["Galaxy","M88"], "Entity[\"Galaxy\", \"M88\"]", "galaxy"]),"Sloan Digital Sky Survey b-band DR7","GIF","BrightnessScaling"->"LogLog","AngularSize"->{(QuantityPostfix[7, "'", arc minutes, "ArcMinutes"]),(QuantityPostfix[7, "'", arc minutes, "ArcMinutes"])},"PixelDimension"->{450,450}]

Conclusions

• We can now specify and change time system in dates, for precise control of time.

• We have seen examples of the use of a variety of astro-related WFR functions, both for computation and visualization.

• We can also use WFR functions to connect to large astro catalogs and databases.

Future Work

• Introduce AstroPosition, following GeoPosition, to change coordinates and frames in astrometry.

• Connect to the NAIF/SPICE kernels for precise data on solar system ephemerides.

• Introduce AstroGraphics, following GeoGraphics, to produce star maps and views of the sky from any location and using any frame.