LIGO Open Science Center
LIGO
is operated by
California Institute of Technology
and
Massachusetts Institute of Technology
|
Tutorial Step 0: Software SetupIntroductionThe data in the LIGO Open Science Center (LOSC) archive is in both HDF5 and gravitational wave frame (GWF) file formats. Example software for HDF5 files is available in a variety of languages, including C, C++, Matlab, and Java. In tutorial will provide a walk-through only of how to install and use Python modules to work with LIGO data. However, if you prefer to work in another language, you may still find some parts of this tutorial useful for understanding the contents of a LIGO data file.
This tutorial will describe use of HDF5 files. To instead use GWF frame files, first follow the
instructions for installing the Frame Library and LSC software.
Note that the example example API,
which is described in Tutorial 4,
will work for both GWF and HDF5 files downloaded from the LIGO Open Science Center.
To work through this tutorial, you will need to first install
the following packages on your computer:
In addition, you may also want to install these optional packages:
If your computer already has all of these packages isntalled, then you should be able to move on to the next section of the tutorial. If not, here are some suggestions for how to install the needed software. Option 1: Install Pre-compiled Software: Enthought
Option 2: Install Pre-compiled Software: Anaconda
Option 3: Install with MacPorts
If you do not already have MacPorts installed, then follow the installation instructions provided by the MacPorts Project Official Home Page. Both to check if MacPorts is installed, and to update it if is, open a terminal window and type:
The port selfupdate command may take a few minutes
or more to run. After MacPorts is installed and updated, you
can run the following sequence of commands to both download and
install the software we will use for this tutorial.
Then, you should be able to run python by typing
Option 4: Install Packages Individually
Verify Software InstallationOnce 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.
|