Differences between revisions 49 and 68 (spanning 19 versions)
Revision 49 as of 2012-11-13 06:50:03
Size: 5368
Comment:
Revision 68 as of 2012-12-19 13:14:36
Size: 6409
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:

Python related announcements and questions:''' python-friends@lists.zmaw.de '''

Join the list by sending: ''' python-friends-join@lists.zmaw.de '''
Line 90: Line 94:
  [[/Pandas | Lesson code ]] [[PythonCourse/PythonLES/Pandas|Lesson code]]
Line 97: Line 100:
 * [[http://pandas.pydata.org/pandas-docs/dev/api.html| Official site with documentation ]]
  
 * [[http://pandas.pydata.org/pandas-docs/dev/api.html|Official site with documentation]]
Line 100: Line 103:

[[/Parallel_Programming | Lesson code ]]
[[PythonCourse/PythonLES/Parallel_Programming|Lesson code]] [[PythonCourse/PythonLES/ParallelSlides|... and slides]]
Line 105: Line 106:
   * The GIL issue   * The GIL issue
Line 110: Line 111:
   * openMP, MPI
   * more sophuisticated clustering, scheduling and load balancing ....
 * [[https://github.com/ianozsvald/ParallelPython_EuroSciPy2012| Ian Ozsvald's lesson at SciPy2012 ]]
  * openMP, MPI
  * more sophuisticated clustering, scheduling and load balancing ....
 * [[https://github.com/ianozsvald/ParallelPython_EuroSciPy2012|Ian Ozsvald's lesson at SciPy2012]]
Line 115: Line 116:
 * cdo - python interface  * [[https://code.zmaw.de/projects/cdo/wiki/Cdo{rbpy}|cdo - python/ruby interface]]
Line 117: Line 118:
=== Integration of other programming languages (Alex, 06.12) ===
 * R
 * f2py
 * C-code
 * matlab
 * http://wiki.python.org/moin/IntegratingPythonWithOtherLanguages
=== Integration of other programming languages (Nikolay Koldunov, Mikhail Itkin, 06.12) ===
 * Ipython Notebook [[https://wiki.zmaw.de/lehre/PythonCourse/PythonLES?action=AttachFile&do=get&target=map.ipynb|Ipython lesson notebook]]
 * f2py | [[PythonCourse/PythonLES/F2Py|f2py lesson code]]
 * R and Python tutorials:
  * [[http://www.r-bloggers.com/accessing-r-from-python-using-rpy2/|rpy2: Accessing R from Python video tutorial]]
  * [[http://rpy.sourceforge.net/rpy2/doc-dev/html/introduction.html|Gentle RPY2 tutorial]]
 * [[http://wiki.python.org/moin/IntegratingPythonWithOtherLanguages|Python integration with other languages]]
 * Bonus: [[http://code.google.com/p/pyresample/|Pyresample]]- reprojection of geospatial data


= Tips and Tricks =
 * Spearman rank correlation revisited in python [[attachment:Spearman.pdf | Documentation how to do it (PDF)]], [[ attachment:TestSpearman.py | script ]]

LES python seminar series (Thursday, 10:30 - 12:00, Geomatikum, 1729)

contact: Alex Loew, Julia Pongratz

Python related announcements and questions: python-friends@lists.zmaw.de

Join the list by sending: python-friends-join@lists.zmaw.de

What you should be able to do in advance

  • python programming structures
  • if clauses
  • function calling
  • print statements
  • well, running python scripts (in python shell and interactive shell like ipython)
  • edit python scripts in the editor of your choice
  • ...


Seminar outline

Part 1

Working with arrays (Gernot, Michael) (19.07.2012)

Plotting (1D,2D,3D) (Alex) (2.8.2012)

Course material for plotting

* subplots, figure, axis objects; easy and more sophisticated appraoches

  • always use figure/ax
  • a brief tour through matplotlib gallery

    • lineplots
    • fill_between
    • contour plots
  • nice colorbars, colormaps handling etc.
  • working with different axes in a single plot; twinx()
  • saving figures
    • fitting to actual content
  • tight_layout

Geospatial data format handling and vizualization (Mikhail) (16.08.2012)

Lesson code examples

  • PyNio - handling netCDF

    • read netCDF
    • write netCDF
      • data type conversion
        • how to write a numpy array (double) in a float netcdf variable?
        • how to store data as scaled integers?
  • GDAL: the door to a huge number of different file formats. GDAL (Python) API tutorial

  • Basemap

  • PyNGL Tutorial

system operations (Michael) (30.8.2012)

Commented examples from the seminar

  • replacing BASH: working with os and system objects
  • os.system, subprocess etc.
  • python as a replacement for bash
  • how to debug a python program?

Structuring a program (Mikhail) (13.9.2012)

Commented program from the seminar

  • general structure of python scripts
  • writing python functions, what are the keyworded and the non-keyworded arguments
  • writing modules and classes, why and how to create custom objects
  • naming convention
  • how to parse command line input for options and arguments

Part 2

pyCMBS (Alex) (31.10. as part of the Wednsday seminar)

  • introduction to pyCMBS
  • cdo interfacing
  • anomaly calculations, hovmoeller plots etc ...
  • EOF, SVD analysis

time series analysis: the Pandas module (Mikhail) (25.10.)

Lesson code

parallel programming (Heinrich Widmann) (08.11.)

Lesson code ... and slides

  • Threading vs. multiprocessing
    • The GIL issue
  • ParallelPython module (pp)

  • Processing module
  • Further approaches and techniques ...
  • Not (really) addressed :
    • openMP, MPI
    • more sophuisticated clustering, scheduling and load balancing ....
  • Ian Ozsvald's lesson at SciPy2012

python CDO interface (Ralf Mueller) (22.11.)

Integration of other programming languages (Nikolay Koldunov, Mikhail Itkin, 06.12)

Tips and Tricks


other topics

  • statistical analysis of large data sets
  • animations
  • GUI programming (Alex, remon???)
  • H5PY - simple access to HDF5 files
  • python2.x or python3.x (does it make a difference?)

LehreWiki: PythonCourse/PythonLES (last edited 2012-12-19 13:14:36 by AlexanderLoew)