Function Repository Resource:

AAVSOLightCurveData

Source Notebook

Import astronomical light curve data from the AAVSO International Database

Contributed by: Truman Tapia

ResourceFunction["AAVSOLightCurveData"][object]

queries AAVSO International Database and returns the light curve data for the given astronomical object.

ResourceFunction["AAVSOLightCurveData"][object,params]

returns the light curve data for the given object and query parameters.

ResourceFunction["AAVSOLightCurveData"][,form]

returns data in the specified format form.

Details

ResourceFunction["AAVSOLightCurveData"] uses the API of the AAVSO International Database (AID) to get the data.
The astronomical object can be specified as a string or an Entity.
Most Wolfram star entities are not directly found in AID.
ResourceFunction["AAVSOLightCurveData"][object, "ObjectData"] returns basic properties about the object.
The second argument of ResourceFunction["AAVSOLightCurveData"] can also be an Association with the following optional keys:
"DateRange"Alltemporal range of the data queried
"Filters"Allobservation filters to include
"ObserversCode"Allobservers to include by code
"ReducedData"Truewhether to get the symplified data fields or all the fields
"DateRange" can be specified as a pair of dates {start, end} where each date can be a DateObject or a Julian Date number.
"FIlters" and "ObseversCode" can be specified as a string or a list of strings.
The description of the photometry filters in the AID can be found by running ResourceFunction["AAVSOLightCurveData"]["FiltersDescription"] or here.
The catalog of astronomical objects available in the AID is published in the Vizier database under the catalog name B/vsx . This catalog can be queried using the resource function VizierCatalogData .
The following formats can be used as an additional argument in ResourceFunction["AAVSOLightCurveData"][, "form"]:
"RawData"a list of lists containing the column names in the first list and the data in the remaining lists
"Association"a nested association with dates as keys on the first level and properties as keys on the second level
"Dataset"a dataset with named columns where each row is an observation (Default)
"TemporalData"temporal data where each path corresponds with a filter
The meaning of the variability class codes can be found in the international variable star index.

Examples

Basic Examples (2) 

Query the magnitude of Betelgeuse during the first three days of 2023:

In[1]:=
ResourceFunction["AAVSOLightCurveData"][
 Entity["Star", "Betelgeuse"], <|
  "DateRange" -> {DateObject[{2023, 1, 1}, "Day"], DateObject[{2023, 1, 3}, "Day"]}|>]
Out[1]=

Get data about the magnitude of Mira star in the last 3 months in the Johnson V band:

In[2]:=
ResourceFunction["AAVSOLightCurveData"][
 Entity["Star", "Mira"], <|"Filters" -> "V", "DateRange" -> {Now - Quantity[3, "Months"], Now}|>]
Out[2]=

Scope (2) 

Get complete information about observations of Betelgeuse during the first three days of 2023 and display it as raw data:

In[3]:=
ResourceFunction[
 "AAVSOLightCurveData"]["Betelgeuse", <|
  "DateRange" -> {DateObject[{2023, 1, 1}, "Day"], DateObject[{2023, 1, 3}, "Day"]}, "ReducedData" -> False|>]
Out[3]=

Get the object data about Mira star:

In[4]:=
ResourceFunction["AAVSOLightCurveData"][
 Entity["Star", "Mira"], "ObjectData", "Dataset"]
Out[4]=

Get the magnitude data of Mira, as TemporalData, measured by the observer whose code is DEY during 2023:

In[5]:=
ResourceFunction["AAVSOLightCurveData"][
 Entity["Star", "Mira"], <|"ObserversCode" -> "DEY", "DateRange" -> {DateObject[{2023}, "Year"], Now}|>, "TemporalData"]
Out[5]=

Properties and Relations (3) 

One can obtain the list of stars with the variability type RR in the AAVSO database by using the Vizier database, as follows:

In[6]:=
aavsoStars = ResourceFunction["VizierCatalogData"]["B/vsx/vsx", "Filter" -> Select[#Type === "RR" &]]["B/vsx/vsx"]
Out[6]=

Query the object data in the AAVSO database of the first star in this list:

In[7]:=
ResourceFunction["AAVSOLightCurveData"][
 aavsoStars[1, "Name"], "ObjectData"]
Out[7]=

Query information about this star in the SIMBAD database:

In[8]:=
ResourceFunction["SIMBADData"][aavsoStars[1, "Name"], All, "Dataset"]
Out[8]=

Possible Issues (1) 

Most Wolfram stars are not found in AAVSO International Database:

In[9]:=
ResourceFunction["AAVSOLightCurveData"][
 Entity["Star", "HIP5054"], "ObjectData"]
Out[9]=

Neat Examples (2) 

Get data about the Great Dimming of Betelgeuse in the Johnson V band:

In[10]:=
td = ResourceFunction["AAVSOLightCurveData"][
  "Betelgeuse", <|
   "DateRange" -> {DateObject[{2019, 7, 1}, "Day"], DateObject[{2020, 7, 1}, "Day"]}, "Filters" -> "V"|>, "TemporalData"]
Out[10]=

Plot the Great Dimming of Betelgeuse:

In[11]:=
DateListPlot[td, ScalingFunctions -> {None, "Reverse"}, PlotLegends -> td["Filters"]]
Out[11]=

Publisher

Truman Tapia

Version History

  • 1.0.0 – 10 May 2023

Source Metadata

Related Resources

License Information