Summary and Setup
Python supports a large, and growing, informal network of developers – each creating tools that are aimed at solving the needs of their research, or business, community. One of the benefits of using python is the opportunity it gives you to tap into this shared development network, to build on and use the developments that others have made.
This course is designed to introduce you to some of the different libraries and tools that are available for python. The lessons begin with a reminder of the python essentials. It then introduces the concept of JSON formatted data and dictionaries, defensive programming, numpy and matplotlib usage, how to deal with physical quantities and a short introduction to the pandas library.
Prerequisites
This course follows on from lessons 1-8 of the Python introduction course, so we recommend you complete these first.
All material in these lessons pertain to Python 3.
Setup
This lesson is designed to be run on a personal computer. All of the software and data used in this lesson are freely available online, and instructions on how to obtain them are provided below.
Install Python
In this lesson, we will be using Python 3 with some of its most popular scientific libraries. Although one can install a plain-vanilla Python and all required libraries by hand, we recommend installing Anaconda, a Python distribution that comes with everything we need for the lesson. Detailed installation instructions for various operating systems can be found on The Carpentries template website for workshops and in Anaconda documentation.
Obtain lesson materials
- Download python-intermediate-data.zip
- Create a folder called
swc-python
on your Desktop. - Move downloaded file to
swc-python
. - Unzip the file.
You should see a folder called data
in the
swc-python
directory on your Desktop.
Launch Python Interface
We recommend following the instructions in the setup page for Programming for Python for launching the python interface.