save_file

astroquery.sha.save_file(url, out_dir='sha_tmp/', out_name=None)[source]

Download image to output directory given a URL from a SHA query.

Parameters:
url : str

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
out_dir : str

Path for output table or image

out_name : str

Name for output table or image, if None use the file ID as name.

Examples

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