Skip to content

lcharleux/2022_2-3_USMB_scientific_Python_Tutorial_02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCIENTIFIC PYTHON TUTORIAL

June 2-3 2022 SYMME Lab. Annecy

OUTLINE

Python is a very versatile and easy to learn open source language. It has a very large community and is today the most used language in the scientific field. This training aims to train participants to this language with a scientific perspective. The basics of the language and its ecosystem of libraries will be introduced in a first step. The essential tools such as work environments and the GIT versioning tool will also be presented. Then, the students will be put in situation on classical problems: data analysis, modeling and numerical solution of various problems, generation of quality figures. Topics will also be covered according to the needs of the group: image processing, numerical optimization, solving differential equations, machine/deep learning, code performance optimization and high performance computing. Some time will be reserved for practical work on problems related to the thesis of each participant. At the end of the module, students will have the basis to work autonomously on their research topic with Python.

ORGANIZATION

The module is scheduled over 4 half-days:

  1. Working with Python: working environments (Visual Studio Code, Jupyter). Basic programming in Python. Scientific and graphical libraries: Numpy, Scipy, Pandas, Matplotlib, Numba. Various examples.
  2. Creation of a collaborative and documented library: Creation of a documented library with Sphinx in collaborative mode with Git and GitLab/GitHub. Work organization, unit tests, publication of the documentation.
  3. Scientific topics: advanced graphics for publications with Matplotlib (complex graphics, Latex couplings), image processing, optimization, solving differential equations, machine/deep learning (Scikit Learn, PyTorch), code optimization with Numpy/Numba...
  4. Personal project: each participant proposes to solve a problem with the proposed methods. At the end of this session, the project is realized and returned to the form of a library or a GIT repository.

Note: this organization can change to better fit the needs of the group.

PEDAGOGICAL APPROACH

The proposed pedagogical approach is based on examples, individually and collectively according to the participants' research themes. Through these examples, basic skills associated with scientific programming as well as tools more specific to certain themes are addressed.

REQUIREMENTS

The requirements of the module are minimal:

  • Hardware:

    • Come with a laptop.
  • Software:

    • Create a GITHub account.
    • Install the following software programs:

Remark : these programs exist for Windows, Linux and MAC OS. GIT is installed on Linux by default.

SKILLS

Skills acquired at the end of the training :

  1. Know how to use Python in a basic way to solve common problems in research.
  2. Find information sources and libraries to solve advanced problems.
  3. Know how to structure your code to make it scalable and reusable.
  4. Know how to develop a library associated with your research work in order to associate it with your publications.

REMARKS

Each participant must come with a laptop with WIFI connection throughout the module. They must the rights to install software (disk space required: 2GB). No computer will be provided to participants.

CHECKPOINTS

DAY 1

Introduction

  • Round table
  • Software verification
  • First example: simple 2D plot (numpy, matplotlib)
  • More complex example: CSV file and plot 3D map (pandas, scipy) or elementary cellular automata
  • Classical IDE (VScode, Spyder)
  • Notebook interface (Jupyter)

Better code

  • Functions and classes: why and how ?. Examples: vector, or csv dataset numerical integration.
  • Fast code with Python (Python, numpy, numba): example Moore neighbors and the Game of Life

Topics to chose

  • Data processing with Pandas
  • Image processing
  • Applied math: optimization, integration, ODE, curve fitting.
  • Machine learning: Scikit, Pytorch,
  • Others

DAY 2

Your own library:

  • Modules and classes
  • Code Versioning with GIT
  • Collaborating with GIT

Personal project:

  • Apply new skills to your project

Needs (round table):

  • Matlab vers Python
  • Qu'est ce qu'un kernel ?
  • Modules, packages et tests unitaires.
  • Partage de code via GIT.
  • Modules liés à des domaines: Psycopy, OpenSesame.
  • Lecture fichiers textes, formats de données, échange avec Matlab.
  • Gestion de texte, tables CSV, et pandas.
  • Lancement de logiciels tierces, fichiers d'entrée et de sortie.
  • Traitement d'images, identification d'éléments de microstructure.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published