示例#1
0
文件: aia.py 项目: dpshelio/smpy
 def download_latest(self, directory):
     aia_latest_url = 'http://jsoc.stanford.edu/data/aia/synoptic/mostrecent/'
     aia_file =  'AIAsynoptic%4.4i.fits' % self.wavelength
     aia_latest_url += aia_file
     try:
         return download_file(aia_latest_url,directory)
     except Exception:
         raise
         raise DownloadFailed
示例#2
0
def download(urls, directory):
    """ Download files from urls into directory.
    
    Parameters
    ----------
    urls : list of str
        urls of the files to retrieve
    directory : str
        directory to save them in
    """
    return [download_file(url, directory) for url in urls]
示例#3
0
文件: create.py 项目: astrofrog/sunpy
 def from_url(cls, url):
     """ Return object read from URL.
     
     Parameters
     ----------
     url : str
         URL to retrieve the data from
     """
     default_dir = sunpy.config.get("downloads", "download_dir")
     path = download_file(url, default_dir)
     return cls.read(path)
示例#4
0
def download(urls, directory):
    """ Download files from urls into directory.
    
    Parameters
    ----------
    urls : list of str
        urls of the files to retrieve
    directory : str
        directory to save them in
    """
    return [download_file(url, directory) for url in urls]