Beispiel #1
0
 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
Beispiel #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]
Beispiel #3
0
 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)
Beispiel #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]