The following examples are taken from the HMI Science Nugget about the drms
Python module.
This examples shows how to access the HMI data (e.g. Dopplergrams, magnetograms and intensity maps) that are locally stored on the DRMS server at KIS. This example was taken from the recent Python Workshop.
Note: In order to be able to access our local FITS files, you need to run this notebook on a computer that has access to the KIS NFS, e.g. on one of our compute or login servers.
The following code lines can be used to test if everything is installed properly.
import sys
print(' python: %d.%d.%d' % sys.version_info[:3])
import numpy
print(' numpy:', numpy.__version__)
import pandas
print(' pandas:', pandas.__version__)
import drms
print(' drms:', drms.__version__)
import astropy
print(' astropy:', astropy.__version__)
import matplotlib
print('matplotlib:', matplotlib.__version__)
client = drms.Client()
print(client)
sharp_info = client.info('hmi.sharp_720s')
print('SHARP pkeys:', sharp_info.primekeys)
myemail = 'name@example.com'
print('Checking email...', end='')
if client.check_email(myemail):
print('\r"{}" is correctly registered at JSOC.'.format(myemail))
else:
print('\r"{}" is NOT registered at JSOC.'.format(myemail))