Tutorial Step 0: Software Setup

Introduction

The data in the LIGO Open Science Center (LOSC) archive is in both HDF5 and gravitational wave frame (GWF) file formats.

This tutorial will provide a walk-through only of how to install and use Python modules to work with LIGO data. For other languages, see the example software for HDF5 files and the LOSC Software Examples page.

The LOSC tutorials depend mainly on Python along with a few popular modules, including matplotlib, numpy and h5py. If your computer already has these installed, you should be ready for the LOSC tutorials. If not, here are some suggestions.


Option 1: Run tutorials in your browser

  • No installation needed
  • Use Microsoft Azure or mybinder.org to run tutorials in your browser


Option 2: Install Pre-compiled Software: Enthought

  • Basic Installation
Enthought offers some pre-compiled versions of Python that will run with a simple point and click. The free distribution ('Canopy Express') does not include h5py by default, and so is not recommended for this tutorial. However, a free academic license is available to students, staff, and faculty at academic institutions, and this may provide an easy-to-install solution.
  1. Use your .edu e-mail address to request a free academic license
  2. Download and install Canopy Express
  3. Enter your license information to get the full version.


Option 3: Install Pre-compiled Software: Anaconda

  • Basic Installation
A python distribution with the required packages included is also available for free from Continuum Analytics. Anaconda should be easy to install:
  1. Visit the Anaconda download page and follow instructions.


Option 4: Install Packages Individually

  • Experts only
All of the software for this tutorial is freely available. You may wish to use a package manager, such as pip or macports. We recommend Python version 2.7. Download and install the following packages:
  1. HDF5 (Windows users can skip this step)
  2. Python
  3. NumPy
  4. matplotlib
  5. SciPy
  6. h5py
  7. IPython and Jupyter (optional)



Verify Software Installation

Once you have installed the software, open the python interpreter, and type the following lines. If everything works, this should plot a parabola.
import numpy as np
import matplotlib.pyplot as plt
import h5py
vector=np.arange(20)
plt.plot(vector**2)
plt.show()

What's next?

Once you have all the needed software installed, it is time to learn how it works. If you are already have some experience with Python, you can go to the next step of this tutorial. However, if you are new to Python, you may want to look at some tutorials on numpy and matplotlib. After you are comfortable with Python's basic features, you can go to the next step of this tutorial.