Launching ARTview from Interactive Command Line Session

You've imported your libraries


In [21]:
import os
import pyart
import artview
#from artview.view import view
import matplotlib.pyplot as plt

%matplotlib inline

You're working with a file let's say


In [6]:
fdir = '/Users/guy/data/nexrad/KMPX/nex2/20130513'
fname = 'KMPX20130513_185823_V06'
fpath = os.path.join(fdir, fname)
print(fpath)


/Users/guy/data/nexrad/KMPX/nex2/20130513/KMPX20130513_185823_V06

You loaded a radar instance


In [8]:
r = pyart.io.read(fpath)
r.fields.keys()


Out[8]:
['differential_phase',
 'cross_correlation_ratio',
 'spectrum_width',
 'reflectivity',
 'differential_reflectivity',
 'velocity']

You then apply any number of cool features

  • You dealiased your data via pyart.correct.dealias
  • You did some phase processing via pyart.correct.phase_proc
  • Etc.
  • So now you want to visualize what it looks like

    
    
    In [13]:
    disp = pyart.graph.RadarDisplay(r)
    
    fig = plt.figure()
    ax = fig.add_subplot(111)
    
    disp.plot('reflectivity', 0, vmin=-32, vmax=64., cmap='pyart_NWSRef')
    disp.plot_range_rings([50, 100])
    disp.plot_cross_hair(5.)
    ax.set_xlim(-150., 150)
    ax.set_ylim(-150., 150)
    
    
    
    
    Out[13]:
    (-150.0, 150)

    Or you could start up an interactive ARTview session from here!

    
    
    In [22]:
    artview.view.view(r)
    
    
    
    
    Changed Scan types, reinitializing
    

    And that makes you a radar hero

    
    
    In [ ]: