Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Open http://cluster-r730-1:8001/ui in a browser.

Image RemovedImage Added

To download sharp_720s images over a period of time you have to set the series parameter and the start and end date. Optionally, you can request the available hmi-meta data by the corresponding meta parameter, which may requires some time. After trying it out you should see the request url which you can use in your python code:

Code Block
languagepy
http://cluster-r730-1:8001/HMI/hmi.sharp_720s?start=2015-12-11T00%3A00%3A00Z&end=2015-12-12T00%3A00%3A00Z&meta=false

The result of this query will be a list of SHARP files with a link to them to download it:

Code Block
languagejs
[
  {
    "date__obs": "20162015-0112-19T0111T23:1034:08.400000Z799999Z",
    "download_time": null,
    "exptime": null,
    "harpnum": 6178,
    "mask_cadence": null,
    "nbr_update": 0,
    "quality": 10240,
    "recnum": 19584855605571,
    "recnum_init": null,
    "series_name": "hmi.sharp_cea_720s_nrt",
    "t_rec_index": 10101661005598,
    "time": "2016-01-20T0120T05:3541:2833.643542Z750935Z",
    "type": null,
    "urls": [
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_conf_disambig/5605571/magnetogram.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_Bt_err/5605571/bitmap.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_Br/5605571/Dopplergram.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_Br_err/5605571/continuum.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_magnetogram/5605571/inclination.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_Bp_err/5605571/azimuth.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_bitmap/5605571/field.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_Bp5605571/vlos_mag.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_Dopplergram5605571/dop_width.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_Bt5605571/eta_0.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958485_20160119011008_continuum/5605571/damping.fits",
    ],     "wavelnth": 6173
  }"http://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/src_continuum.fits",
  {     "date__obs": "2016-01-19T01:10:08.400000Zhttp://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/src_grad.fits",
    "download_time": null  "http://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/alpha_mag.fits",
    "exptime": null,     "mask_cadence": null"http://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/chisq.fits",
    "nbr_update": 0  "http://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/conv_flag.fits",
    "quality": 1024,     "recnum": 1958492"http://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/info_map.fits",
    "recnum_init": null,     "series_name": ""http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/5605571/confid_map.fits",
    "t_rec_index": 1010166,     "time": "2016-01-20T01:35:30.847712Z"http://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/inclination_err.fits",
    "type": null,     "urls": ["http://cluster-r730-1:8001/HMI/hmi.sharp_720s/5605571/azimuth_err.fits",
       "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958492_20160119011008_conf_disambig5605571/field_err.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958492_20160119011008_Bt_5605571/vlos_err.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958492_20160119011008_Br5605571/alpha_err.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/19584925605571/field_20160119011008inclination_Br_err.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/19584925605571/field_20160119011008az_magnetogramerr.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/19584925605571/inclin_20160119011008azimuth_Bp_err.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/19584925605571/field_20160119011008alpha_bitmaperr.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/19584925605571/inclination_20160119011008alpha_Bperr.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/19584925605571/azimuth_20160119011008alpha_Dopplergramerr.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958492_20160119011008_Bt/5605571/disambig.fits",
      "http://cluster-r730-1:8001/HMI/hmi.sharp_cea_720s_nrt/1958492_20160119011008_continuum5605571/conf_disambig.fits"
    ],
    "wavelnth": 6173
  },
  ...
]

Loading Metadata

We recommend the python library requests to interact with the rest interfaces from python.

...

Code Block
languagepy
# define the query parameter
start_date = '2015-12-11T00:00:00Z'
end_date = '2015-12-12T00:00:00Z'
 
incl_meta = 'false'

# retrieving list of SHARP images
print('loading SHARP list...')
sharp_list = requests.get("http://cluster-r730-1:8001/HMI/hmi.sharp_720s?start=%s&end=%s&meta=%s" % (start_date, end_date, incl_meta)).json()

...



# extract specific properties of the first SHARP image
sharp_image = 0
first_sharp_date = sharp_list[sharp_image]['date__obs']
first_sharp_urls = sharp_list[sharp_image]['urls']

 

Given the above request url we could download all related hmi-meta data which is, however, not recommended. Resolving hmi-meta data requires some time whereas we may not be interessted in all meta data for all SHARP images. For this reason, we can reload specific meta data for a given set of images.

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.

...