In [1]:
from IPython.display import Image
Image(filename='Figs_ipandcg_2014/2014_Session_0.png')
Out[1]:

6 ECTS Points => 150 - 180 work hours

30h - lectures

30h - labs + project

115h - 150h self work

  1. Reports in iPython notebook published on lab's webpage (the same way like here)
  2. Short tests during each classes (?)
  3. Presence during classes is obligaotry (!)
  4. Important annoucements will be published in the callendar

Scope of the classes:

1. Graphical User Interface (GUI)

2. Image processing

3. Computer graphics

4. Data structures

5. Programming in Python

6.Projects

Project report should be send as a html file created in IPython notebook on each Thursday. The subject of the email should be as follows:

ipandcg_2014_surname1_surname_2_project-topic_report_nr_X.html


Useful links

Lectures and laboratory instructions for Biomedical Engineering (sem.: 1,3,4):

Lectures and laboratory instructions for Inżynieria Biomedyczna - in Polish (sem.: 1,2,3,4):

On-line tutorials:


IPython

IPython - information: webpage.

Canopy

  1. File -> New -> Ipython Notebook
  2. To swith between inline or external window use magic cammand:
    • %pylba inline
    • %pylab qt

Enthought Python Distribution (EPD)

  1. Run command window (cmd)
  2. Go to folder with your projects (cd command)
  3. Type in:
    • ipython notebook --pylab=inline
    • ipython notebook --pylab=tk

Getting information and help

Some examples:

In [23]:
x = arange(100)
y = sin(x*pi/50)
plot(x,y,label='sinus')
legend()
Out[23]:
<matplotlib.legend.Legend at 0xc35c470>
In [5]:
# type ctr+m b to create new cell belowe
# you can use plt and np shortcuts
from scipy.misc import lena
img = lena()
plt.imshow(img, cmap=plt.cm.gray)
#run Cell with SHIFT+Enter
Out[5]:
<matplotlib.image.AxesImage at 0x537d130>
In [1]:
from IPython.display import YouTubeVideo
YouTubeVideo('DNRJwENqEUY')
Out[1]:

Getting help

Python Scientific Lecture Notes - 1.6 Getting help and finding documentation

In []:
np.squeeze?
In []:
np.squeeze??
In []:
# tab completion
help (np.s) # hit TAB key
In []:
# In Ipython, the magical function %psearch search for objects matching patterns.
# This is useful if, for example, one does not know the exact name of a function.
%psearch np.diag*
In []:
#numpy.lookfor looks for keywords inside the docstrings of specified modules.
numpy.lookfor('convolution')
# or 
#np.lookfor('convolution')

Data stuctures build-in Python

1. Strings 1, 2

2. Lists

3. Dictionaries

4. Tuples

one can compose new class when it is needed

5. Classes