Wolfram Research

Function Repository Resource:

SkyViewImage

Source Notebook

Get images from SkyView

Contributed by: Truman Tapia

ResourceFunction["SkyViewImage"][loc]

gets an image of a sky location from SkyView.

ResourceFunction["SkyViewImage"][loc,survey]

gets an image of a sky location from a specified astronomical survey.

ResourceFunction["SkyViewImage"][loc,survey,format]

gets the image with the specified format.

Details and Options

ResourceFunction["SkyViewImage"] gets images from SkyView through URL queries.
A sky location can be specify by an Entity or {ra, dec}. When Entity is provided, the position of the entity object is used.
The name of the astronomical surveys supported by SkyView can be obtained through ResourceFunction["SkyViewImage"][band], where band can take the following values: "Gamma", "X-Rays", "UV", "Optical", "Millimeter", "Infrared", and "Radio".
The following formats are supported: "JPEG","JPG","GIF","FITS","TIFF","PNG","BMP".
When spefiying a format, one can give the element spefications supported by Import.
ResourceFunction["SkyViewImage"] takes the following options:
"PixelDimension" {300, 300} dimensions of the image in pixels
"AngularSize" Automatic angular coverage of the output image
"BrightnessScaling" "Logarithmic" scaling in brighness that is applied to the image
"AstroProjection" "Gnomic" projection that is employed in the output image
"AngularSize" specifies the size of the sky region in the output image as {width, height}.
"BrightnessScaling" can take the following values: "Linear","SquareRoot","Logarithmic","HistogramEqualization", and "LogLog".
"AstroProjection" can take the following values: "Aitoff","Mollweide","Gnomic","Equirectangular","Orthographic","COBE","LambertAzimuthal","AzimuthalEquidistant".
All information concerning sky regions is interpreted in the equatorial coordinates. Angular values are assumed to be in angular degrees, unless Quantity is used.

Examples

Basic Examples (2) 

Get an image of a star:

In[1]:=
ResourceFunction["SkyViewImage"][Entity["Star", "HIP5054"]]
Out[1]=

Get an image of the galaxy "M31" specifying the angular size of the image:

In[2]:=
ResourceFunction["SkyViewImage"][Entity["Galaxy", "M31"], "AngularSize" -> {Quantity[200, "ArcMinutes"], Quantity[200, "ArcMinutes"]}]
Out[2]=

Scope (3) 

Get an image of the galaxy from the Original Digitized Sky Survey:

In[3]:=
ResourceFunction["SkyViewImage"][
 Entity["Galaxy", "M87"], "Original Digitized Sky Survey"]
Out[3]=

Get the summary of the FITS file that contains an image of :

In[4]:=
ResourceFunction["SkyViewImage"][
 Entity["Star", "Polaris"], {"FITS", "Summary"}]
Out[4]=

Get the image of such a file:

In[5]:=
img = ResourceFunction["SkyViewImage"][
  Entity["Star", "Polaris"], {"FITS", "Image"}]
Out[5]=

Adjust the image:

In[6]:=
img[1] // ImageAdjust
Out[6]=

Get the GIF image of from the Sloan Digital Sky Survey g-band DR7:

In[7]:=
ResourceFunction["SkyViewImage"][
 Entity["Galaxy", "M88"], "Sloan Digital Sky Survey g-band DR7", "GIF", "BrightnessScaling" -> "LogLog", "AngularSize" -> {Quantity[7, "ArcMinutes"], Quantity[7, "ArcMinutes"]}, "PixelDimension" -> {400, 400}]
Out[7]=

Options (6) 

PixelDimension (1) 

Get an image with a size of 70x70 pixels:

In[8]:=
ResourceFunction["SkyViewImage"][
 Entity["AstronomicalRadioSource", "3C273"], "PixelDimension" -> {70, 70}]
Out[8]=

AngularSize (2) 

Some astronomical objects do not fit in the resulting image with the default angular size:

In[9]:=
ResourceFunction["SkyViewImage"][Entity["Star", "Altair"]]
Out[9]=

Get the same image with a specific angular size:

In[10]:=
ResourceFunction["SkyViewImage"][Entity["Star", "Altair"], "AngularSize" -> {Quantity[15, "ArcMinutes"], Quantity[15, "ArcMinutes"]}]
Out[10]=

AstroProjection (1) 

Get an image with a specified projection to use in the resulting image:

In[11]:=
ResourceFunction["SkyViewImage"][Entity["Galaxy", "M31"], "AngularSize" -> {Quantity[9, "AngularDegrees"], Quantity[9, "AngularDegrees"]}, "AstroProjection" -> "Mollweide"]
Out[11]=

BrightnessScaling (2) 

Some astronomical objects cannot be visualized properly with the default brightness scaling:

In[12]:=
ResourceFunction["SkyViewImage"][
 Entity["Galaxy", "M88"], "Sloan Digital Sky Survey g-band DR7", "AngularSize" -> {Quantity[7, "ArcMinutes"], Quantity[7, "ArcMinutes"]}]
Out[12]=

Changing the brightness scaling allows a better visualization:

In[13]:=
ResourceFunction["SkyViewImage"][
 Entity["Galaxy", "M88"], "Sloan Digital Sky Survey g-band DR7", "BrightnessScaling" -> "LogLog", "AngularSize" -> {Quantity[7, "ArcMinutes"], Quantity[7, "ArcMinutes"]}]
Out[13]=

Properties and Relations (2) 

One can obtain the position of astronomical objects through the resource function SIMBADData:

In[14]:=
objectPosition = ResourceFunction[
ResourceObject[
Association[
    "Name" -> "SIMBADData", "ShortName" -> "SIMBADData", "UUID" -> "9a06e66d-a823-4a0e-99ac-3b8ab5ee210a", "ResourceType" -> "Function", "Version" -> "2.0.0", "Description" -> "Import astronomical data from the SIMBAD database", "RepositoryLocation" -> URL[
      "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$fb3218ac1d4a4839af862ccc8d47f1dc`SIMBADData", "FunctionLocation" -> CloudObject[
      "https://www.wolframcloud.com/obj/9c24e812-5a09-4fcf-a823-76c5dc130306"]], ResourceSystemBase -> Automatic]][
  "HIP 7000", {"RightAscension", "Declination"}]
Out[14]=

Now, get an image of the object:

In[15]:=
ResourceFunction["SkyViewImage"][objectPosition]
Out[15]=

Get the major axis of :

In[16]:=
majorAxis = ResourceFunction[
ResourceObject[
Association[
    "Name" -> "SIMBADData", "ShortName" -> "SIMBADData", "UUID" -> "9a06e66d-a823-4a0e-99ac-3b8ab5ee210a", "ResourceType" -> "Function", "Version" -> "2.0.0", "Description" -> "Import astronomical data from the SIMBAD database", "RepositoryLocation" -> URL[
      "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$fb3218ac1d4a4839af862ccc8d47f1dc`SIMBADData", "FunctionLocation" -> CloudObject[
      "https://www.wolframcloud.com/obj/9c24e812-5a09-4fcf-a823-76c5dc130306"]], ResourceSystemBase -> Automatic]][
  Entity["Galaxy", "M31"], {"GalaxyMajorAxis"}]
Out[16]=

Get an image of using its major axis as the angular size of the image to ensure a correct visualization:

In[17]:=
ResourceFunction["SkyViewImage"][Entity["Galaxy", "M31"], "AngularSize" -> {majorAxis, majorAxis}]
Out[17]=

Possible Issues (1) 

A black background may be returned if a survey does not cover the sky region requested:

In[18]:=
ResourceFunction["SkyViewImage"][{0, -30}, "Bonn 1420 MHz Survey"]
Out[18]=

Resource History

Source Metadata

Related Resources

License Information