HTTP Program Interface for Finder Chart
Introduction Examples XML Output Description of XML Tags
The Finder Chart service can be accessed via an HTTP GET/POST program interface where the request is a set of "parameter=value" pairs. The return is an XML document containing the URLs to the retrieved data, a result HTML page, and the URLs to the JPEG images contained in the HTML page. This document describes the input parameters and the structure of the returned XML.
Some of the interactive features found on the HTML form interface such as the clicking of a result image to interactively adjust the image's intensity stretch and the links to OASIS (On-line Archive Science Information Services) visulizer are not available. The table upload option on the form interface (which loops over a list of coordinates to produce all the results in one submit) is not necessary in program mode since programmers can perform this looping themselves.
The following shows a typical query:
- Base URL for the service is https://irsa.ipac.caltech.edu/cgi-bin/FinderChart/nph-finder
- Input parameters are specified by standard parameter/value pairs: "locstr=m101" specifies the search center of the subset images. This query does not specify either the sizes of the images or the survey names so the default image size is 5 arcmin x 5 arcmin and all three available datasets (SDSS, DSS, and 2MASS) are retrieved.
- Output is an XML document containing the URL of an HTML page, the URLs of the retrieved FITS images, and the JPEG images both in the original FITS image sizes and in the smaller preview version that appear on the HTML page. The JPEG images are rotated so they are in the same orientation and the ones in the HTML page are scaled to be the same size so as to be useful as a Finder Chart. See the example 1 in the outexample1 section below for details.
Input Parameters Introduction Examples XML Output Description of XML Tags
The input parameters are entered as standard HTTP "parameter=value" pairs in HTTP/GET syntax. In this syntax, the parameter name is followed by an equal sign which is then followed by a value. No extra spaces are allowed and if the value contains any spaces or special characters that might cause ambiguities they have to be encoded as shown in any HTTP or URL reference. As shown above, these pairs are separated from each other by ampersand (&) characters.
Input Parameters
Parameter | Values | Default | Description |
mode | "cgi" or "prog" | cgi | Specifies the format of the returned file: "cgi" for the HTML format and "prog" for the XML format. |
locstr | (locstr examples) | NA | The "locstr" is the only required parameter; if it is an object name, it is resolved into coordinates using NED and, if that fails, SIMBAD. When the "locstr" is a coordinate string such as "102.03730 +59.77120 ga", it should be URL encoded as "102.03730++59.77120+ga". In this case each 'white space' is encoded as '+' (see example 3 ). |
subsetsize | a decimal number | 5.0 | Specifies the cutout size of the retrieved images in arcmin. It should be between 1.0 and 6.0 arcmin. |
survey | SDSS, DSS, or 2MASS | all datasets retrieved | Specifies the survey dataset to be retrieved; each parameter pair "survey=value" (e.g. "survey=SDSS") specifies one dataset. To specify multiple datasets, simply add more parameter pairs to the query (e.g. "survey=sdss&survey=dss") as in Example 4. When unspecified it defaults to retrieving all three datasets. |
orientation | right or left | left | Specifies whether to point the EAST axis to the left as specified in the FITS image or to flip the image so that EAST points to right while generating JPEG images; NORTH is up in all cases. |
reproject | true or false | false | Specifies whether to reproject and resample the images from different bands of a dataset to a uniform resolution while generating the JPEG images. When it is chosen, these resamples images can be used to make color images; however the option takes longer (3 minutes) to run. |
grid_orig | true or false | false | Specifies whether a grid should be added to the JPEG images. |
grid_shrunk | true or false | false | Specifies whether a grid should be added to the shrunken JPEG images that appear on the returned HTML page. |
markervis_orig | true or false | false | Specifies whether a location marker should be added to the output JPEG images. |
markervis_shrunk | true or false | true | Specifies whether a location marker should be added to the shrunken JPEG images that appear on the returned HTML page. |
Examples Introduction Input Parameters XML Output Description of XML Tags Note: The following examples can be run by clicking their links; examples 1 through 7 produce valid results while 8 and 9 are examples of error conditions. Example 1 returns the HTML result while the other examples return the XML results.
-
nph-finder?locstr=m101
Retrieved images for the area centered on object "m101" with default image size of 5.0 arcmin, and returns a HTML result. (see the output from Example 1 in the XML Output session below.) -
nph-finder?locstr=m101&survey=2mass&reproject=true
Retrieved 2MASS images for the area centered on object "m101" with the default image size of 5.0 arcmin and with the reproject option turned on so the images will be reprojected and color images generated. (see the output from Example 2 in the XML Output session below.) -
nph-finder?locstr=210.77805++54.32714&subsetsize=4.0
Retrieved images for the area centered on object at coordinates "210.77805 +54.32714" (14h03m06.73175s +54d19m37.7082s) and with image size of 4.0 arcmin. -
nph-finder?locstr=102.03730++59.79745+ga&subsetsize=4.0
Retrieved images for the area centered on the same position as the previous example, using Galactic coordinates "102.03730 +59.79745 ga" and with image size of 4.0 arcmin. -
nph-finder?locstr=m101&survey=2mass&survey=dss
Retrieved 2MASS and DSS images for the area centered on object "m101" with the default image size of 5.0 arcmin. -
nph-finder?locstr=m101&survey=2mass&orientation=right
Retrieved 2MASS images for the area centered on object "m101" and with default image size of 5.0 arcmin. Since the orientation is specified to be "right", the JPEG images will be made with East to the right. -
nph-finder?locstr=m101&survey=2mass&grid_orig=true&markervis_orig=true
Retrieved 2MASS images for the area centered on object "m101" with default image size of 5.0 arcmin and draws both grid and input location marker on the original JPEG images. -
nph-finder?locstr=xxx
The input location of this query is unresolvable, it produces the error condition: "Coordinate [xxx] lookup error: Invalid location specification or object name." (see the output from Example 8 in the XML Output section below). -
nph-finder?locstr=m101&subsetsize=8.0
The input search radius of this query is larger than 6.0 arcmin, it produces the error condition: "ERROR: Subimage size: [8.0] out of range."
XML Output Introduction Input Parameters Examples Description of XML Tags Normally, when you run a web application the return is HTML text which is rendered in a browser and contains links to download additional data files. However, HTML is notoriously difficult to parse, so in program mode we instead return a simple XML document. This document can be rendered in a browser but the normal use pattern is as follows: have your program make an HTTP request using the above parameters; retrieving the XML result into a file (or memory); parse it; extract links to the desired final data files; and use these links (again from your program) to retrieve the data. The interaction above can be done in a variety of ways, ranging from simple scripting (using programs like 'wget') to integrated URL-access and XML-parsing in JAVA, PERL, Python, etc. Our XML is simple enough that if you do not have XML-parsing tools simple pattern checking (manually built code or tools like PERL) should suffice. The returned XML "inventory" contains a result HTML page which includes the rotated and scaled JPEG images from the retrieved images so they are all same size and orientation for being useful as a Finder Chart. In addition, it contains the URLs of the retrieved FITS images, the scaled JPEG images used in the HTML page, and the JPEG images in the original size. It also contains the 2MASS glint and persistent artifacts tables if the 2MASS survey is queried. Below we give example XML output for two of the use cases above. The first block is from Example 1 above (a normal return) and the second is an example error return (from Example 8). After these examples, we will enumerate all the tags that might be returned by a successful query. These examples vary only in the input constraints; their XML outputs are identical in layout with varying number of result images and the images themselves. Note: In the real XML files, all this is just text. Here we have turned some of this text into links so you can see examples of the resullt files. This is just for illustration; the real URLs would point to the IRSA workspace which is cleaned up after 72 hours. XML Output Example 1: XML Output Example 2 XML Output Example 8
<?xml version="1.0"?> <finderchart status="ok"> <input> <locstr> m101 </locstr> <surveys> SDSS,DSS,2MASS </surveys> <subsetsize> 5.0 arcmin </subsetsize> <orientation> left </orientation> <reproject> false </reproject> <grid> false <grid> <marker> false </marker> <shrunkgrid> false </shrunkgrid> <shrunkmarker> true </shrunkmarker> </input> <result> <datatag> ADS/IRSA.FindeChart#2008/0318/100632_18475 </datatag> <equCoord> 14h 3m12.59s 54d20m56.72s eq J2000 </equCoord> <galCoord> 102.03653 +59.77215 eq J2000 </galCoord> <eclCoord> 174.36646 +59.79657 ec J2000 </eclCoord> <totalimages> 13 </totalimages> <htmlfile> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/result_prt.html </htmlfile> <image> <surveyname> SDSS </surveyname> <band> u </band> <obsdate> 2003-03-10 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-u3-0187_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-u3-0187_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-u3-0187_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> SDSS </surveyname> <band> g </band> <obsdate> 2003-03-10 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-g3-0187_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-g3-0187_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-g3-0187_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> SDSS </surveyname> < band> r </band> <obsdate> 2003-03-10 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-r3-0187_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-r3-0187_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-r3-0187_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> SDSS </surveyname> <band> i </band> <obsdate> 2003-03-10 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-i3-0187_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-i3-0187_sub.jpg <jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-i3-0187_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> SDSS </surveyname> <band> z </band> <obsdate> 2003-03-10 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-z3-0187_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-z3-0187_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/fpC-003712-z3-0187_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> DSS </surveyname> <band> dss1b </band> <obsdate> 1955-04-23 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss1_blue_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss1_blue_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss1_blue_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> DSS </surveyname> <band> dss1r </band> <obsdate> 1955-04-23 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss1_red_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss1_red_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss1_red_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> DSS </surveyname> <band> dss2b </band> <obsdate> 1995-03-26 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_blue_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_blue_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_blue_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> DSS </surveyname> <band> dss2r </band> <obsdate> 1993-04-25 < /obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_red_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_red_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_red_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> DSS </surveyname> <band> dss2ir </band> <obsdate> 1997-04-18 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_ir_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_ir_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/poss2ukstu_ir_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> 2MASS </surveyname> <band> J </band> <obsdate> 1999-02-14 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-j1180244_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-j1180244_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-j1180244_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> 2MASS </surveyname> <band> H </band> <obsdate> 1999-02-14 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-h1180244_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-h1180244_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-h1180244_shrink.jpg </shrunkjpgurl> </image> < image> <surveyname> 2MASS </surveyname> <band> K </band> <obsdate> 1999-02-14 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-k1180244_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-k1180244_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-k1180244_shrink.jpg </shrunkjpgurl> </image> <glint> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-1180244_glint.tbl </glint> <persistent> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0001/2mass-atlas-990214n-1180244_persis.tbl </persistent> </result> </finderchart>XML Output Example 2: XML Output Example 1 XML Output Example 8
<?xml version="1.0"?> <finderchart status="ok"> <input> <locstr> m101 </locstr> <surveys> 2MASS </surveys> <subsetsize> 5.0 arcmin </subsetsize> <orientation> left </orientation> <reproject> true </reproject> <grid> false </grid> <marker> false </marker> <shrunkgrid> false </shrunkgrid> <shrunkmarker> true </shrunkmarker> </input> <result> <datatag> ADS/IRSA.FindeChart#2008/0318/100730_18557 </datatag> <equCoord> 14h 3m12.59s 54d20m56.72s eq J2000 </equCoord> <galCoord> 102.03653 +59.77215 eq J2000 </galCoord> <eclCoord> 174.36646 +59.79657 ec J2000 </eclCoord> <totalimages> 3 </totalimages> <htmlfile> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/result_prt.html </htmlfile> <image> <surveyname> 2MASS </surveyname> <band> J </band> <obsdate> 1999-02-14 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-j1180244_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-j1180244_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-j1180244_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> 2MASS </surveyname> <band> H </band> <obsdate> 1999-02-14 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-h1180244_sub.fits </fitsurl> < jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-h1180244_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-h1180244_shrink.jpg </shrunkjpgurl> </image> <image> <surveyname> 2MASS </surveyname> <band> K </band> <obsdate> 1999-02-14 </obsdate> <fitsurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-k1180244_sub.fits </fitsurl> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-k1180244_sub.jpg </jpgurl> <shrunkjpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-k1180244_shrink.jpg <shrunkjpgurl> </image> <colorimage> <surveyname> 2MASS </surveyname> <jpgurl> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass_color.jpg </jpgurl> </colorimage> <glint> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-1180244_glint.tbl </glint> <persistent> https://irsa.ipac.caltech.edu/workspace/TEST/FinderChart/m101.v0002/2mass-atlas-990214n-1180244_persis.tbl </persistent> </result> </finderchart>XML Output Example 8: XML Output Example 1 XML Output Example 2
<?xml version="1.0"?> <results status="error"> <message> Failed to resolve object [xxx] using both NED and SIMBAD. </message> </results>
Tag name | description |
finderchart | The top tag of the XML file which contains a variable "status" indicating whether the query is successful; "ok" for successul query and "error" otherwise. |
message | The error message when the query status is "error". |
input | A section tag which contains several input parameter sub-tags. |
locstr | Input objname or coordinate ( see examples). |
surveys | Surveys included in the query; currently available surveys are: SDSS, DSS, and 2MASS. |
subsetsize | Image subset size in arcmin. |
orientation | The orientaion of the JPEG images as either "left" or "right", as explained in the "Input Parameters" section above. |
reproject | A "true" or "false" value. |
grid | A "true" or "false". |
marker | A "true" or "false". |
shrunkgrid | A "true" or "false". |
shrunkmarker | A "true" or "false" value. |
result | A section tag which contains sub-tags of all the results including the search coordinate (in equatorial, galactic, and ecliptic), an HTML file, and the URL links to the retrieved FITS images, the JPEG images, and the 2MASS glint and persistent artifact tables when the 2MASS survey is requested. |
datatag | The datatag contains the parameters of the query which allows the same query to be reproduced at a later time. Please consult the datatag instruction document on how to rerun the query. |
equCoord | The input location in the equatorial coordinate system and sexigesimal format. |
galCoord | The input location in the galactic coordinate system. |
eclCoord | The input location in the ecliptic coordinate system. |
totalimages | The total number of images retrieved. |
htmlfile | The URL of the HTML file that contains the finder chart. |
image | This is a sub-tag of the "result" tag, but it is a section tag that contains the sub-tags of an image's information and URLs. |
colorimage | This is a sub-tag of the "result" tag, but it is a section tag that contains the sub-tags of the color image's survey name and the URL to the JPEG image. The color image of SDSS survey is made from "g", "r", and "i" bands with "g" band maps to blue pixels, "r" band to green pixels, and "i" band to red pixel. Similarly, DSS color image is made from "DSS2B", "DSS2R", and "DSS2IR" bands; and 2MASS color image is made from "J", "H", and "K's" bands. |
surveyname | The survey name of the retrieved image: SDSS, DSS, or 2MASS . |
band | The band name of the retrieved image. |
obsdate | The observation date extracted from the retrieved FITS image. |
fitsurl | The URL of the retrieved FITS image. |
jpgurl | The URL of the JPEG image which is the same resulution as the FITS image. |
shrunkjpgurl | The URL of the shrunken JPEG image used in the HTML page. |
glint | The URL of the 2MASS glint artifact table. |
persistent | The URL of the 2MASS persistent artifact table. |