Home

Quick Start

Data

Python

Courseware

Lecture Graphics

Problems

Solutions

Bibliography


Example Scripts

 

Overview

Here you will find the set of Python scripts I have written for use with the text, along with instructions for installation and a guide to usage. These scripts are used in the Workbook problems, they allow the reader to reproduce essentially all the calculations and figures in the text, and they provide a basic toolkit for original research. Before delving into this material, you should first take care of a basic Python installation and obtain some familiarity with the language

For an quick summary of what you need, see Quick Start. For most users, Quick Start will be sufficient. The material below covers the same territory in more detail. A tarfile of the complete collection of courseware is here. Eventually I will also provide access to a Git repository on GitHub.

The most recent courseware update was October 10, 2014.

Courseware Modules

These are utilities used throughout the courseware. They should be put in a search path where Python can find them regardless of which directory you are working from. The utility routine setpath.py included below takes care of the chore of setting things up so that Python will find the modules; see the Python portal page for a more extensive discussion of where Python looks for modules. These courseware modules are not really meant to be modified by the student, but one can always make a personal copy and customize if desired. Wherever they are put, the student will be able to read them and see how they work. Freedom to Tinker Rules!

Example scripts illustrating the use of the courseware modules are found here.

 

Chapter Scripts

Each student should have a personal copy of these, in their own home directory. They are meant to be run and modified, to reproduce figures in the text, for further explorations, and for aid in doing the Workbook problems. There are a few Chapter Scripts that are used by chapter scripts in other chapter directories, and you will need to do something to make those available (see the Quick Start page for now). Some chapter scripts access data in the Workbook Datasets. The datapath variable in such scripts needs to be customized to specify where the datasets reside on the system you are using.

Documentation of what each script does is found in the comments embedded in the scripts, and the use of many of these scripts is described in the Workbook problems that need them. Eventually I will provide a comprehensive list of the scripts, their usage, and the figures (and other results) in the text which they were used to produce, as a complement to information of this sort that is already embedded in the individual scripts.