get_file

astroquery.sha.get_file(url)[source]

Return object from SHA query URL.

Currently only supports FITS files.

Parameters
urlstr

Access URL from SHA query. Requires complete URL, valid URLs from the SHA query include columns:

accessUrl -> The URL to be used to retrieve an image or table
withAnc1  -> The URL to be used to retrieve the image or spectra
             with important ancillary products (mask, uncertainty,
             etc.) as a zip archive
Returns
objTable, astropy.io.fits, list

Return object depending if link points to a table, fits image, or zip file of products.

Examples

>>> from astroquery import sha
>>> url = sha.query(pid=30080)['accessUrl'][0]
>>> img = sha.get_file(url)