Skip to content

Latest commit

 

History

History
87 lines (51 loc) · 2.47 KB

README.md

File metadata and controls

87 lines (51 loc) · 2.47 KB

PHYS265: Introduction to Scientific Programming

Introduction to scientific programming with python. Basic data types, sequences, input/output, and program control flow structures. Evaluation and plotting of mathematical functions and data. Statistical interpretation of data, and fitting of data to models. Introduction to numerical methods including integration, solutions of ordinary differential equations, and linear algebra. Extensive use of the numpy, matplotlib, and scipy packages.

In this class we will also introduce git to submit the labs and final coding project.

JupyterLab Desktop

We used to recommend installing anaconda python from Anaconda. but this year we are switching to JupyterLab Desktop. This is a separate app that looks like running jupyter in a browser, but is not using your browwser. It also comes with python embedded, so there is no more need to install python separately.

Installation will outlines in Homework1 in your ELMS page.

Other

1. Jupyter Notebook / Lab

Interactive inside a browser or this year (in 2025) the new JupyterLab Desktop See https://github.com/jupyterlab/jupyterlab-desktop.

a nice figure will go here

2. Spyder

Interactive in a special GUI, much like MATLAB. Comes with anaconda3. See https://www.spyder-ide.org/

a nice figure will go here

3. Colab

Google colab is another way, using Google's cloud services, to work with jupyter notebooks. See https://colab.research.google.com

a nice figure will go here

Conversion python/notebooks

Install jupytext:

  pip install jupytext

Conversion between a notebook (.ipynb) file to a spyder (.py) file:

  jupytext --to ipynb test.py

  jupytext --to py test.ipynb

Codes

Here are some places to find Open Source codes in Physics and Astronomy

  1. Astrophysics Source Code Library (ASCL) : https://ascl.net

  2. Journal for Open Source Software (JOSS): https://joss.theoj.org/

  3. Zenodo : https://zenodo.org/

Software Carpentry

Also some self-guided and OS agnostic lessons on:

  1. Unix shell (even on Windows) : https://swcarpentry.github.io/shell-novice/
  2. Python : https://swcarpentry.github.io/python-novice-inflammation/
  3. Git : https://swcarpentry.github.io/git-novice/

Offline documentation

The spyder tool we are using has excellent help on python: both syntax and API. But if you want something in parallel:

  • Zeal (for Linux)
  • Dash (for Mac) - free alternatives are: dasht and devbook
  • XXX (for Windows)