astroquery:docs

save_file

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

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

Parameters :

url : string

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 retrive the image or spectra

with important ancillary products (mask, uncertainty, etc.) as a zip archive

out_dir : string

Path for output table or image

out_name : string

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

Examples

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

Page Contents