Skip to content

pruzhinskaya/scientific_python

 
 

Repository files navigation

Materials for Scientific Python Course for astronomers of Moscow University

Build Status

How to use this repository

Read files from scientific_python folder in alphabetical order and try to understand how all prints and asserts work.

Repository structure

This repository has a structure of a Python package with some additional files:

  • scientific_python folder represents top level package of the same name. This package contains several sub-packages and modules. You can start with a_intro sub-package and read its modules one by one in alphabetical order. All modules can be used as separate modules and scripts without package installation
  • bin folder contains scripts that can be used after package installation. Now they are used for testing
  • doc folder is used for documentation. Now it contains only MS Word file with course annotation (in Russian)
  • misc contains two sub-folders related to Juyter notebooks used in class:
  • setup.py is used to install this package
  • requirements.txt file contains Python dependencies of the project.
  • virtualenv_activation.sh is a sample shell script (for *nix systems only) that can be used to activate virtualenv and install the package. Use it by typing . virtualenv_activation.sh or source virtualenv_activation.sh. For exit virtualenv type deactivate
  • Dockerfile and docker-compose.yml files can be used to run the project inside Docker container
  • .gitignore and .gitattributes are git files
  • .dockerignore is just a link to .gitignore, it used to prevent load garbage into Docker container
  • .travis.yml is a Travis configuration file. Travis is a continuous integration (CI) system used to test this project with various Python versions, 2.7 and 3.5+ are supported

Seminar materials (2017)

Seminars had place in classroom 17 of Sternberg Astronomical Institute MSU at 13:30 on Fridays from September to December 2017. Records of on-line translations of the seminars are hosted on YouTube.

Date Description Materials Video (in Russian)
2017.09.15 Introduction, coursework requirements. Why Python 3? Numbers, lists, if-else, loops. a_intro.basics, a_intro.sequences link
2017.09.22 Boolean variables, lists, tuples, dictionaries, sets. Strings and their formatting. Functions, arguments packing and unpacking. a_intro.sequences, a_intro.strings, b_modules.functions link
2017.09.29 Functions: default values of keyword arguments, docstrings. Iterators and generators. Modules: file.py as a module. b_modules.* link
2017.10.06 Jupyter notebooks. Read and write files and cats. Introduction to numpy: one-dimensional arrays and indexing. Notebooks, c_numpy.arrays link
2017.10.13 numpy: multidimensional arrays, read tabular data files. Notebooks, c_numpy.multidim_arrays link
2017.10.20 Read tabular data files with numpy and pandas. Figure plotting with matplotlib. Notebooks link
2017.10.27 scipy: integration, interpolation, optimization. Short overview of other features. Notebook, d_scipy.* link
2017.11.03 Introduction to astropy: physical and astronomical constants, quantity calculations, sky coordinates, image manipulation, read and write data. Notebook link
2017.11.10 Packaging of Python project. Classes: example and magic methods. Unit testing. Notebook and script, setup.py of this project, e_testing.* link
2017.11.17 Two examples of astropy, astroquery and photutils usage: Hubble diagram fitting and transient object discovery. Notebooks link
2017.11.24 Dr. Ivan Zolotukhin tells about Django web framework, scientific web programming and model-template-view paradigm. Scripts
2017.12.01 Student Nikita Utkin tells about argparse. Speed up Python script: why Python is slow, why to avoid loops and why we should know how Python works, numba as a simple way to speed up calculations. Scripts and notebook, c_numpy.arrays link
2017.12.08 Parallel execution of Python code. threading and its limitations due GIL. multiprocessing and its limitations due serialisation via pickle. Notebooks link
2017.12.15 Cython language and C-code usage with Python. Python, Cython and C code, f_speed.compilers.* and Cython/C files for this module, setup.py link

License

Copyright (c) 2017, Konstantin L. Malanchev.

All program code in this repository is distributed under the terms of the MIT license. All data files are properties of their authors, see COPYRIGHT_NOTE files in folders with foreign data.

About

Materials for Scientific Python course for astronomers of Moscow University

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 91.1%
  • Python 6.6%
  • HTML 2.2%
  • Other 0.1%