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 specified 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" and "BMP".
When specifying a format, one can give the element specifications supported by Import.
ResourceFunction["SkyViewImage"] takes the following options:
"PixelDimension"{300, 300}dimensions of the image in pixels
"AngularSize"Automaticangular coverage of the output image
"BrightnessScaling""Logarithmic"scaling in brightness 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 to make the details visible:

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 70×70 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:

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 gives 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["SIMBADData"][
  "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["SIMBADData"][
  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]=

Publisher

Truman Tapia

Version History

  • 1.0.0 – 11 October 2021

Source Metadata

Related Resources

License Information