Time-domain data

The TimeSeries

Gravitational-wave detectors are time-domain instruments, attempting to record gravitational-wave amplitude as a differential change in the lengths of each of the interferometer arms. The primary output of these detectors is a single time-stream of gravitational-wave strain.

Alongside these data, thousands of auxiliary instrumental control and error signals and environmental monitors are recorded in real-time and archived for off-line study.

GWpy provides the TimeSeries object as a way of representing these and similar time-domain data. The TimeSeries is built from the numpy.ndarray, and so many of the methods and applications of this object should be familiar to numpy users.

For example, to create a simple TimeSeries filled with random data:

>>> from numpy.random import random
>>> from gwpy.timeseries import TimeSeries
>>> t = TimeSeries(random(1000))
>>> print(t)
TimeSeries([ 0.59442285, 0.61979421, 0.62968915,...,  0.98309223,
             0.94513298, 0.1826175 ]
           unit: Unit(dimensionless),
           t0: 0.0 s,
           dt: 1.0 s,
           name: None,
           channel: None)

Here we see the random data we have created, as well as the associated metadata common to any time-domain data:

unit

The physical unit of these data

t0

X-axis coordinate of the first data point

dt

X-axis sample separation

name

Name for this data set

channel

Instrumental channel associated with these data

Associated classes

Alongside the TimeSeries class, gwpy.timeseries module provides a small set of related classes for handling bit-vector data, and collections of data:

TimeSeries

A time-domain data array.

StateVector

Binary array representing good/bad state determinations of some data.

TimeSeriesDict

Ordered key-value mapping of named TimeSeries objects

StateVectorDict

Ordered key-value mapping of named StateVector objects

Reference/API

The above documentation references the following objects:

TimeSeries

A time-domain data array.

TimeSeriesDict

Ordered key-value mapping of named TimeSeries objects

TimeSeriesList

Fancy list representing a list of TimeSeries

StateVector

Binary array representing good/bad state determinations of some data.

StateVectorDict

Ordered key-value mapping of named StateVector objects

StateTimeSeries

Boolean array representing a good/bad state determination