<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Basic reading and visualization of radar data with Py-ART
Introduction to Jupyter
What you are looking at is a Jupyter Notebook, a web-based interactive computation enviroment well suited for creating and sharing examples of scientific Python computations.
<img class="logo" src="images/jupyter-logo.svg" height=100 />
One of the key features of Jupyter notebooks is that Python code can be written and executed in cells. 
Click on the next cell and press shift+enter to execute the Python code.
Step1:  Cells can also be used to create textual materials using the markup language Markdown.  
Double click on this cell (or any others) to see the raw markdown which produces the nicely formatted text.
One of the reasons these Notebooks are so well suited for scientific Python work is that Juypter is well integrated into the Scientific Python ecosystem.  For example, plots can be included in notebooks for visualizing data.  Execute the next two cells (using ctrl+enter)
Step2:  <img class="logo" src="images/python-logo.png" height=100 align='right'/>
Python
General-purpose.
Interpreted.
Focuses on readability.
Excellent for interfacing with C, C++ and Fortran code. 
Comprehesive standard library.
Extended with a large number of third-party packages.
Widely used in scientific programming.
This presentation will give a brief into to some key features of Python and the Scientific Python ecosystem to help those not familar with the language with the remainder of the class.  This is in no way a comprehensive introduction to either topic.  Excellent tutorials on Python and Scientific Python can be found online.
We will be using IPython for this class which is a package which allows Python code to be run inside a browser.  This is in no way the only way to run python, the Python/IPython shell, scripts and various IDEs can also be used but will not be covered.
The notebook for this materials is available if you wish to follow along on your own computer, but we will be moving fast...
Variables
Integers
Step3:  Floating point numbers
Step4:  Variables
Complex numbers
Step5:  Booleans
Step6:  Variables
Strings
Step7:  Variables can be cast from one type to another
Step8:  Containers
Lists
Step9:  Indexing
Step10:  Slicing
Step11:  Lists can store different type of variable in each element
Step12:  Containers
Dictionaries
Step13:  Containers
Tuples
Step14:  Flow control
conditional (if, else, elif)
Step15:  Flow control
Loops
Step16:  Functions
Step17:  Classes
Step18:  The Scientific Python ecosystem
NumPy
Step19:  Arrays can be multi-dimensional
Step20:  The Scientific Python ecosystem
SciPy
Step21:  The Scientific Python ecosystem
matplotlib
<ASSISTANT_TASK:>
Python Code:
# This is a Python comment
# the next line is a line of Python code
print("Hello World!")
Explanation: Basic reading and visualization of radar data with Py-ART
Introduction to Jupyter
What you are looking at is a Jupyter Notebook, a web-based interactive computation enviroment well suited for creating and sharing examples of scientific Python computations.
<img class="logo" src="images/jupyter-logo.svg" height=100 />
One of the key features of Jupyter notebooks is that Python code can be written and executed in cells. 
Click on the next cell and press shift+enter to execute the Python code.
End of explanation
# These two lines turn on inline plotting 
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([1,2,3])
Explanation: Cells can also be used to create textual materials using the markup language Markdown.  
Double click on this cell (or any others) to see the raw markdown which produces the nicely formatted text.
One of the reasons these Notebooks are so well suited for scientific Python work is that Juypter is well integrated into the Scientific Python ecosystem.  For example, plots can be included in notebooks for visualizing data.  Execute the next two cells (using ctrl+enter)
End of explanation
a = 1
a + 1
Explanation: <img class="logo" src="images/python-logo.png" height=100 align='right'/>
Python
General-purpose.
Interpreted.
Focuses on readability.
Excellent for interfacing with C, C++ and Fortran code. 
Comprehesive standard library.
Extended with a large number of third-party packages.
Widely used in scientific programming.
This presentation will give a brief into to some key features of Python and the Scientific Python ecosystem to help those not familar with the language with the remainder of the class.  This is in no way a comprehensive introduction to either topic.  Excellent tutorials on Python and Scientific Python can be found online.
We will be using IPython for this class which is a package which allows Python code to be run inside a browser.  This is in no way the only way to run python, the Python/IPython shell, scripts and various IDEs can also be used but will not be covered.
The notebook for this materials is available if you wish to follow along on your own computer, but we will be moving fast...
Variables
Integers
End of explanation
b = 2.1
b + 1
a + b
type(a + b)
Explanation: Floating point numbers
End of explanation
c = 1.5 + 0.5j  # complex numbers
print(c.real)
print(c.imag)
Explanation: Variables
Complex numbers
End of explanation
d = 3 > 4 
print(d)
type(d)
Explanation: Booleans
End of explanation
s = "Hello everyone"
type(s)
a = "Hello " 
b = "World"
print(a + b)
Explanation: Variables
Strings
End of explanation
a = 1
print(a)
print(type(a))
b = float(a)
print(b)
print(type(b))
s = "1.23"
print(s)
print(type(s))
f = float(s)
print(f)
print(type(f))
Explanation: Variables can be cast from one type to another
End of explanation
l = ['red', 'blue', 'green', 'black', 'white']
len(l)
Explanation: Containers
Lists
End of explanation
l
print(l[0])
print(l[1])
print(l[2])
print(l[-1])   # last element
print(l[-2])
l[0] = 'orange'
print(l)
Explanation: Indexing
End of explanation
print(l[2:5])
print(l[2:-1])
print(l[1:6:2])
l[::-1]
Explanation: Slicing
End of explanation
ll = [5, 22.9, 14.8+1j, 'hello', [1,2,3]]
ll
print(ll[0])
print(ll[1])
print(ll[2])
print(ll[3])
print(ll[4])
Explanation: Lists can store different type of variable in each element
End of explanation
d = {'name': 'Bobby', 'id': 223984, 'location': 'USA'}
d.keys()
d.values()
d['name']
d['id']
d['id'] = 1234
d['id']
Explanation: Containers
Dictionaries
End of explanation
t = ('red', 'blue', 'green')
t[0]
t[1:3]
Explanation: Containers
Tuples
End of explanation
a = 4
if a > 10:
    print("a is larger than 10")
elif a < 10:
    print("a is less than 10")
else:
    print("a is equal to 10")
Explanation: Flow control
conditional (if, else, elif)
End of explanation
for i in range(10):
    print(i)
Explanation: Flow control
Loops
End of explanation
def func():
    print("Hello world")
func()
Explanation: Functions
End of explanation
class Car(object):
    
    engine = 'V4'    # class attribute
    
    def start(self):  # class method
        print("Starting the car with a", self.engine, "engine")
mycar = Car()
type(mycar)
mycar.engine
mycar.start()
mycar.engine = 'V6'
mycar.engine
mycar.start()
Explanation: Classes
End of explanation
import numpy as np
a = np.array([0, 1, 2, 3, 4, 5, 6, 7])
a
a.shape
a.ndim
a.dtype
a[0::2]
a[a>3]
a * 2 + 100
a.mean()
Explanation: The Scientific Python ecosystem
NumPy
End of explanation
b = np.arange(12).reshape(3,4)
b.shape
b
b[1,2]
b[0:2, ::-1]
Explanation: Arrays can be multi-dimensional
End of explanation
import scipy
print(scipy.__doc__)
Explanation: The Scientific Python ecosystem
SciPy
End of explanation
%pylab inline
plot([1,2,3])
a = np.random.rand(30, 30)
imshow(a)
colorbar()
Explanation: The Scientific Python ecosystem
matplotlib
End of explanation
<END_TASK>