PH10102 Python 2020/21

This is the collection of notebooks used for the University of Bath PH10102 Experimental physics and computing 1 Python labs.

You can access each set of notebooks through the links below. Some exercises require data files that are linked within the relavent notebooks.

Prerequisites:

These lessons assume you have a basic knowledge of coding and python, such as how to assign variables, do simple calculations and write a function. However, I try to review these concepts where appropriate.

Sections:

Section Description
Introduction to Jupyter Notebooks Introduction to Jupyter notebooks, review of Python basics.
Handling with data with Python and Pandas Working with data using Python and pandas
Least squares fitting and uncertainties Fitting models to data, assessing uncertainties
More pandas and plt Combining datasets with pandas, fancy data visualisations

Setup:

These instructions assume you already have python and jupyter installed. If you're using the standard Anaconda installation, you shouldn't need to install any extra packages. If not, you may also need to install the follwing packages:

  • numpy
  • matplotlib
  • scipy
  • pandas

Comments and suggestions?

If you have any comments and/or suggestions for improvements to these lessons, please get in touch with Vicky Scowcroft (email on University of Bath website).