#!/usr/bin/env python # coding: utf-8 # network(), radar() and site() objects # == # *** # # This notebook introduces the high-level python interface with the radar.dat and hdw.dat content. # For more in-depth access (i.e., your own hdw.dat), look at the radInfoIO module: # # radInfoIo? # In[1]: # Import radar module get_ipython().run_line_magic('pylab', 'inline') from davitpy.pydarn.radar import * # ### Import all radars # This could be used to iterate through radars, plot them all on a map, find radars in view of specific points... # In[2]: radars = network() print radars # In[3]: # How to get the total number of radars print len(radars) print radars.nradar # In[4]: # How to get a specific radar from the mountain of recorded radars print radars.getRadarByCode("bks") # is equivalent to... #print radars.getRadarById(33) #print, radars.getRadarByName("Blackstone") # In[5]: # How to get a specific radar site information at a given date from datetime import datetime print radars.getRadarByName('Goose Bay').getSiteByDate(datetime(2011,1,4)) # ### Import a specific radar # Saves memory and time # In[6]: # How to get only one radar without getting all the other radars rad = radar(code='bks') print rad # ### Import a specific radar site # Saves even more memory and time # In[7]: # How to get a site without going trhough the whole network or radar classes print site(code='bks', dt=datetime(2010,11,17)) # In[ ]: