Scientific Programming in Python
Code | Completion | Credits | Range | Language |
---|---|---|---|---|
12PYTH | Z | 2 | 0+2 | Czech |
- Course guarantor:
- Pavel Váchal
- Lecturer:
- Jakub Urban
- Tutor:
- Jakub Urban, Pavel Váchal
- Supervisor:
- Department of Laser Physics and Photonics
- Synopsis:
-
The aim of this course is to learn the fundamentals of the modern Python programming language with a focus on scientific computing. Emphasis is placed on effective solutions to real problems. The course is performed in an interactive form of practical exercises, whose topics can be tailored to the content of other subjects or student theses. Students are also involved in ongoing research. In the introductory part of the course, students learn the basic features of Python?from basic types to object oriented or functional programming. The greater part of the course focuses on specific features of Python for scientific programming. Presented are the main numerical libraries NumPy, SciPy and the Matplotlib graphics library. We show how to generate efficient code, how to combine Python with other languages, what tools are available.
- Requirements:
-
Mandatory: No particular subject needed for qualification
Recommended: Practical knowledge of at least one suitable programming language (C/C++, Fortran, Matlab, Java, Pascal, etc.), knowledge of basics of linear algebra and numerical methods (1st term level)
- Syllabus of lectures:
-
1.Introduction to Python - basic features and tools, conventions, data types, conditions, functions
2.Containers and (im)mutable types, iterators, generators
3.Functional and object-oriented programming, modules
4.Exceptions, unit tests, Python debugger, core modules
5.Complete project in Python - conventions, good practices, documentation, available tools, documentation (Sphinx), package distribution
6.Introduction to NumPy - class ndarray, basic operations, polynomials
7.Graphical output - Matplotlib, reading and writing from / to files
8.Advanced work with NumPy - specifics of ndarray and other classes (matrix, masked array), linear algebra
9.Introduction to SciPy and SymPy
10. Optimization of numerical calculations - vectorization, profiling, Cython, f2py
11. Parallel Computing - threads, processes, message passing
- Syllabus of tutorials:
-
Individual or group specific programming tasks using the acquired knowledge. Exercises will use larger simulation codes and libraries, or work on ongoing research projects. Students will also be given space to deal with problems associated with their further education or bachelor's or master's theses.
- Study Objective:
-
Knowledge: Basics of Python, Python properties for solving scientific problems, an overview of available tools.
Skills: Effective design and implementation of scientific tasks in Python, the ability to find and use available tools.
- Study materials:
-
Key references:
1.V. Haenel, E. Gouillart, G. Varoquaux: Python Scientific Lecture Notes, http://scipy-lectures.github.com
2.H.P. Langtangen: A Primer on Scientific Programming with Python
Recommended references:
3.H.P. Langtangen: Python Scripting for Computational Science
4.M. Pilgrim: Dive Into Python 3, http://getpython3.com/diveintopython3
5.Z.A. Shaw: Learn Python The Hard Way, http://learnpythonthehardway.org
Equipment:
Computer laboratory with UNIX/Linux OS and Python installed
- Note:
- Further information:
- http://server.ipp.cas.cz/~urban/PythonLectures
- Time-table for winter semester 2024/2025:
- Time-table is not available yet
- Time-table for summer semester 2024/2025:
- Time-table is not available yet
- The course is a part of the following study plans:
-
- Fyzikální inženýrství - Počítačová fyzika (PS)
- Aplikace informatiky v přírodních vědách (elective course)
- Aplikované matematicko-stochastické metody (elective course)
- Jaderná a částicová fyzika (elective course)
- Matematické inženýrství - Matematické modelování (elective course)
- Kvantové technologie (elective course)
- Physical Engineering - Computational physics (PS)
- Quantum Technologies (elective course)
- Nuclear and Particle Physics (elective course)