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:
The physical unit of these data |
|
X-axis coordinate of the first data point |
|
X-axis sample separation |
|
Name for this data set |
|
Instrumental channel associated with these data |
Alongside the TimeSeries
class, gwpy.timeseries
module provides a small set of related classes for handling bit-vector data, and collections of data:
A time-domain data array. |
|
Binary array representing good/bad state determinations of some data. |
|
Ordered key-value mapping of named |
|
Ordered key-value mapping of named |
The above documentation references the following objects:
A time-domain data array. |
|
Ordered key-value mapping of named |
|
Fancy list representing a list of |
|
Binary array representing good/bad state determinations of some data. |
|
Ordered key-value mapping of named |
|
Boolean array representing a good/bad state determination |