Since the SkyView web server is itself running the same software packaged in the SkyView-in-a-Jar you can use the User's Guide to get a detailed understanding of all of the arguments that are available for either approach. On this page we briefly describe how URLs are parsed into settings that are passed into the Web server's SkyView-in-a-Jar and then review some of the most commonly used settings.
SkyView-In-A-Jar
When SkyView-in-a-Jar is run from the command line, settings may
be given in input files or on the command line using keyword=value
strings. When we access SkyView over the Web, settings are extracted
simply by taking the CGI keyword=value parameters
and making them the settings
for the run. The user is free to specify any settings
with the exception of the the location of the output files (Output)
and caches (Cache). Some settings do not make much
sense in the Web environment but typically they are ignored if they
cannot be used.
SkyView web server scripts
Another easy way to build and retrieve SkyView URLs is using the
skvbatch and webquery Perl scripts we provide (skvbatch calls webquery). These are old and very simple Perl scripts and may not work behind firewalls. To address this problem we have recently created the skvbatch_wget.pl Perl script that uses wget, a more robust retrieval package that runs on most UNIX-like operating systems as well as Microsoft Windows. wget is included with most systems. To download wget or get more information visit the GNU website.
Downloads:
It is also possible to build the URL explicitly and using wget or curl may be your easiest option, or feel free to modify our scripts to your requirements.Note: The AF_INET and SOCK_STREAM values in webquery (lines 62 and 63) are operating system dependent. Please check your socket.h file (usually located in /usr/sys/include/sys or something similar) for the proper values and update webquery accordingly. You may also need to change the first lines of the scripts to point to your local version of perl.
To use these just enter something like the following examples (syntax is the same for skvbatch and skvbatch_wget):skvbatch file=FILE [key=Value key=Value etc.]
Example 1 skvbatch file=example1.fits position='+12 34, -10 23' \ Survey='Digitized Sky Survey' Example 2 skvbatch file=example2.fits Position=hd184927 \ Survey='Digitized Sky Survey' LUT=Fire \ Coordinates='Galactic' Example 3 skvbatch file=example3.fits Position='+12 34, -10 28' \ Catalog='SAO STAR CATALOG' Size=5 Pixels=500 Example 4 Perl script to do multiple queries #!/usr/bin/perl $i = 0; @array = ("'3c273'","'0 41, +41 5'","'crab nebula'", "'14 21 23.2, -12 24.3'"); foreach (@array) { $i++; $filename="example$i.gif"; system("skvbatch Position=$_ Survey='Digitized Sky Survey' Catalog='HST guide stars (1.1)' Return=gif Grid Pixels=400,200 file=$filename"); } Example 5 Perl script to retrieve a RGB image Retrieving an RGB images with a skvbatch script is slightly more involved. The skvbatch script was designed with the idea of the user retrieving a single output file. In a typical SkyView request there are two images produced: the FITS file and the quicklook image. The user gets to pick the image they want by specifying the return format. However with RGB requests there are four images produced and three of them are in the same format. We currently do not provide a way of parametrizing the request to get the specific file the user wanted. However we do provide a way to get back the stem that SkyView is using in generating all of the files. The "return=filename" parameter setting can be used. This returns just a single string which you can use to build the full URLs pointing to any of the files generated in the RGB image construction. If, for example, skvbatch returns a value XXX then the four files are: https://skyview.gsfc.nasa.gov/tempspace/fits/XXX_1.fits https://skyview.gsfc.nasa.gov/tempspace/fits/XXX_2.fits https://skyview.gsfc.nasa.gov/tempspace/fits/XXX_3.fits https://skyview.gsfc.nasa.gov/tempspace/fits/XXX_rgb.jpg With this stem you can easily retrieve the JPEG image directly. Here is a little C shell script that you can use to get RGB JPEGs. #!/bin/csh set name=`skvbatch survey=dss,dss2b,dss2r rgb=t position=3c273 return=filename` wget https://skyview.gsfc.nasa.gov/tempspace/fits/${name}_rgb.jpg -O rgb.jpg
Once executed, a FITS file is returned into the file specified on the command line (or to standard output if no file is given).
Quotes are only necessary for values that contain blank spaces.
The following returns an GIF image with a grid and catalog overlay:
https://skyview.gsfc.nasa.gov/cgi-bin/images?Position=mkn421&Survey=HRI&Coordinates=Galactic&Grid=&Catalog=hipparcos&Return=GIF
Required: Position=name/value - Coordinate position or name Survey=survey[,survey,...] - Survey[s] to generate images from Optional: Coordinates=value - Coordinate system (e.g., J2000, B1950, Galactic, ICRS) Projection=proj - Map projection (Tan, Sin, Car, Ait, Zea, Csc) Scaling=scl - Brightness scaling (Log, Linear, Sqrt, HistEq) Size=size[,size] - The size[s] of the image in degrees. If only one value is given the image is square. Pixels=n[,m] - The number of pixels in the image. If only one value is given the height and width are the same. Catalog=catalogs[,catalog] - The name of the catalog[s] to be queried. Each name can be a HEASARC short name, a Vizier catalog name, or a VO Cone Search base URL. Smooth=value[,value] - dimension[s] of smoothing box. Sampler=samp - Sampling to use (NN, Lin, Clip, Lanczos, Spline) Resolver=res - Resolver to translate names to coordinates (SIMBAD-NED, NED-SIMBAD, NED, SIMBAD) Grid=[Coords] - Overlay a grid on the image [in a given coordinate system] LUT=name - Use the given lookup table to translate brightness to color. Contour=survey[,scale[min,max[,nlevel]]] - Overlay contours from the given survey using the given scaling (Linear, Log, Sqrt). The user can optionally specify the range and number of contours. RGB - If this is specified three values are expected in the survey field and these will be used to generate a three-color image as Red/Green/Blue.
SkyView has been developed with generous support from the NASA AISR and ADP programs (P.I. Thomas A. McGlynn) under the auspices of the High Energy Astrophysics Science Archive Research Center (HEASARC) at the NASA/ GSFC Astrophysics Science Division.
We gratefully acknowledge the support of NASA and contributors of SkyView surveys.
|