SiaProgrammingPython

This lesson motivates the use of Python. The Python programming language is compared with other systems for satellite image processing and analysis.

Software for Satellite Image processing and analysis

Programming languages

Ideal programming language for satellite image processing and analysis

Ideal programming language for satellite image processing and analysis?

Visual environments

Examples

Programming versus visual environments

Scripting verus Traditional Programming

Why Python?

Scalability

Scientific Python Environment

Getting started with IPython

Invoking the IPython shell

ipython
ipython -pylab

loads pylab module and enables interactive plotting

Quit with CTRL-D

Getting help

help()
help modules

list available modules

Features of IPython:

Importing modules

There are many ways to import modules. The resulting namespaces are different

Defining functions and visualization

def tv(a):
        imshow(a,interpolation='nearest')       
        colorbar()

a=rand(10,10)
tv(a)
savefig('figure1.png',dpi=100)

x=linspace(0,2*pi,100)
plot(x,sin(x),x,cos(x))
grid()
axis('tight')
legend(('sin(x)','cos(x)'),'upper right')
xlabel('x')
ylabel('f(x)')

LehreWiki: SiaProgrammingPythonIntroduction (last edited 2008-04-12 09:07:05 by anonymous)