...
Code Block | ||
---|---|---|
| ||
# define the query parameter sharp_image = 5601499 fields = ['area', 'cmask', 'distcoef'] # retrieving list of meta data print('loading meta data...') meta_dataresponse = requests.get("http://cluster-r730-1:8001/HMI/hmi.sharp_720s/meta/%s?fields=%s" % (str(sharp_image), ','.join(fields))).json() meta_data = response['data'] |
Downloading Images
With the metadata it is now possible to download the actual images. To do this we have written a tiny function which needs a url as parameter and downloads the file. The image name will be obtained from the header of the http response. The files are written in to the same folder where the script is.
...