Skip to main content

Tools for reading LIGO data files

Project description

ReadLIGO

This module provides tools for reading LIGO data files. Data along with supporting documentation can be downloaded from the GWOSC web site.

! Notice
This module has been deprecated and we recommend using GWPy instead.
We keep this module public for archival reasons only. No further development is planned.

Installation

To install download the repo and install with pip

git clone https://git.ligo.org/gwosc/readligo.git; cd readligo
pip install .

Documentation

Some possible use cases are shown below.

Example 0

To load all data from a single file:

strain, time, dq = rl.loaddata("ligo_data/H-H1_LOSC_4_V1-842653696-4096.hdf5", "H1")

Some GWF files require parameters to name the strain, DQ, and hardware injection channel:

strain, time, dq = rl.loaddata(
    "H-H1_LOSC_16_V1-1127415808-4096.gwf",
    "H1",
    strain_chan="H1:GWOSC-16KHZ_R1_STRAIN", 
    dq_chan="H1:GWOSC-16KHZ_R1_DQMASK",
    inj_chan="H1:GWOSC-16KHZ_R1_INJMASK"
)

Example 1

This default configuration assumes that the needed LIGO data files are available in the current working directory or a subdirectory. LIGO data between the input GPS times are loaded into STRAIN. META is a dictionary of gps start, gps stop, and the sample time. DQ is a dictionary of data quality flags.

segList = getsegs(842657792, 842658792, 'H1')
for (start, stop) in segList:
  strain, meta, dq = getstrain(start, stop, 'H1')
  # -- Analysis code here
  ...

Example 2

In Example 2, H1_segs.txt is a segment list downloaded from the GWOSC web site using the Timeline application. This may be used in the same manner as segList in example 1.

segList = SegmentList("H1_segs.txt")

Example 3

In this example, the first command searches the indicated directory and sub-directories for LIGO data files. This list of data files is then used to construct a segment list and load the requested data.

filelist = FileList(directory="/home/ligodata")
segList = getsegs(842657792, 842658792, "H1", filelist=filelist)
for start, stop in segList:
  strain, meta, dq = getstrain(start, stop, "H1", filelist=filelist)
  # -- Analysis code here

Segment Lists

Segment lists may be downloaded from the GWOSC web site using the Timeline Query Form or constructed directly from the data files.

Read in a segment list downloaded from the Timeline application on the GWOSC web site with SegmentList.

from readligo import SegmentList
seglist = SegmentList("H1_segs.txt")

Or Construct a segment list directly from the LIGO data files with getsegs.

from readligo import getsegs
seglist = getsegs(842657792, 842658792, 'H1', flag='DATA', filelist=None)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

readligo-0.6.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

readligo-0.6.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file readligo-0.6.1.tar.gz.

File metadata

  • Download URL: readligo-0.6.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for readligo-0.6.1.tar.gz
Algorithm Hash digest
SHA256 c07baaf7febac6406d6ad566d116d6dee7b219492a12d19f02b93b3e3c967f4b
MD5 282f92f697450a9dd096040aa4c4f2e0
BLAKE2b-256 d03c3fe25867b26478420b798e99e40b11c7e8457efd13fa42899100c87f05ec

See more details on using hashes here.

File details

Details for the file readligo-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: readligo-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for readligo-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 294ab78c7da9dc20f1c2ddbe1c5550f10caf334860ecca4d3293474b74f33f4e
MD5 4a7a5fa5cc4c63f087373329eff54bcf
BLAKE2b-256 d6182edbe78d9bbfee8638302fdf75caf4594679d801b3558d7906bdac3bb70a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page