LOSC Data on the LIGO Data Grid

LOSC data is available on the LIGO data grid (LDG).
gsissh ldas-pcdev1.ligo.caltech.edu
LOSC data is available in the directory: /archive/losc/ The data may be accessed in several ways. For example, LOSC frame files can be accessed in the same way as other LIGO data, using ligo_data_find:
$ ligo_data_find -u file -t H1_LOSC_4_V1 -o H -s 800000000 -e 900000000 
In addition, the LOSC example API works on the LDG. In this way, you can work on the LDG in exactly the same way as you would on you laptop. For example, you can prototype code on your laptop, and then run batch jobs on the LDG.
$ export PYTHONPATH=$PYTHONPATH:/home/losc/py
$ ipython
> import readligo as rl
> filelist = rl.FileList()
You are now ready to use LOSC data, and the LOSC API, exactly as on your laptop. For example, see the documentation on the LOSC API Examples page. As a concrete example, let's say we want to write a loop over data which passes Burst CAT2 data quality. We could both construct the segment list and load the data like this:
$ export PYTHONPATH=$PYTHONPATH:/home/losc/py
$ ipython

import readligo as rl
import matplotlib
matplotlib.use('Agg')
import numpy as np

#-- Create the list of LOSC data files 
filelist = rl.FileList()

# -- Set start and stop times
start = 844605900
dur = 10000
stop = start + dur

# -- Construct a segment list
seglist = rl.getsegs(start, stop, 'H1', filelist=filelist, flag='BURST_CAT2')
print seglist

# -- Loop over segments, load data, print first few samples
for (start, stop) in seglist:
  strain, meta, dq = rl.getstrain(start, stop, 'H1', filelist=filelist)
  print strain[0:5]
Note that constructing a segment list often results in warnings about missing files. This is normal behaviour for the LOSC sample API - it is a reminder that there are no data files for times with no available science mode data. As an alternative, segment lists can be downloaded from the LOSC web site using Timeline.

Now that you know how to load data on the LDG, you may want to see some of the other examples on the LOSC tutorial page.