# Introduction to Scientific Computing#

https://oist.github.io/iSciComp/

Kenji Doya

August 2023 in Paris

## Aim of this Book#

This book aims to provide students from non-computational backgrounds with the basic knowledge and practical skills of computing that are required in almost all fields of science today.

It also tries help students’ intuitive understanding of basic mathamatical concepts like eigenvalues and stability through computation and visualization.

Python is used as the standard programming language, but the concepts covered can be helpful also in using other computing tools for data analysis and simulation.

### Jupyter Book#

This book is made by *Jupyter Book* (https://jupyterbook.org).
An important feature is that you can download the source codes as Jupyter Notebook by the Download icon on the top right corner of each chapter.

Rather than just reading the html or pdf text, please run the codes, change parameters, apply your own data, and modify the codes to see how the algorithms really work (or fails).

## Book Contents#

Chapter |
Topic |
Items covered |
---|---|---|

1 |
Introduction to Python |
python, jupyter; data types, for loop |

2 |
Visualization |
matplotlib |

3 |
Vectors and matrices |
numpy; eigenvalue/vector |

4 |
Functions and classes |
name space, object oriented programming |

5 |
Iterative computation |
Newton method, discrete-time dynamics |

6 |
Ordinary differential equation |
scipy; Euler method, stability |

7 |
Partial differential equation |
finite-difference method |

8 |
Optimization |
gradient descent, Gauss-Newton method |

9 |
Sampling methods |
Monte Carlo methods, evolutionary algorithms |

10 |
Software management |
version control system, GitHub |

## Why Computation?#

Theoretical analysis often requires simplifying assumptions.

Thought experiment is limited/biased by the experimenter’s thinking.

Huge data set is impossible to comprehend withtout numerical processing.

…

## Which Tools to Use#

There are a bunch to programming languages and tools to choose from.

### General programming languages#

Fortran

C

C++

Java

MATLAB

Python

### Special purpose tools#

Statistics: SPSS, S, R,…

Genomics: BLAST,…

MRI: SPM, VBM,…

Neuroscience: NEURON, NEST,…

### How to select?#

Satifsy your present need?

Future usability

User community

## How to Learn?#

Textbooks

Online documents

Online courses

Read experts’ codes!

Modify for your needs

Try coding from scratch

…

## References#

### Python#

Python Tutorial [Foundation", 2023] (https://docs.python.org/3/tutorial)

Scientific Python Lectures [Varoquaux

*et al.*, 2023] (http://www.scipy-lectures.org)

### Scientific Computing#

Programming for Computation - Python [Linge and Langtangen, 2016] (https://doi.org/10.1007/978-3-319-32428-9}

Good enough practices in scientific computing [Wilson

*et al.*, 2017] (https://doi.org/10.1371/journal.pcbi.1005510)