Skip to main content

A package for gwtc operations, including interactions with gracedb

Project description

gwtc

A library for creating and interacting with Gravitational Wave Transient Catalogs in gracedb.

[[TOC]]

Quick Start

installation

Note these instructions will be improved and we will make this available in Conda. This is just an example, modify as you see fit.

$ ssh chad.hanna@ldas-pcdev1.ligo-wa.caltech.edu
(igwn) [chad.hanna@ldas-pcdev1 ~]$ mkdir git
(igwn) [chad.hanna@ldas-pcdev1 ~]$ cd git
(igwn) [chad.hanna@ldas-pcdev1 git]$ git clone git@git.ligo.org:chad-hanna/gwtc.git
(igwn) [chad.hanna@ldas-pcdev1 git]$ export PATH=${PATH}:/home/chad.hanna/.local/bin
(igwn) [chad.hanna@ldas-pcdev1 git]$ pip install --user ./gwtc

Create a GWTC table from GraceDB query

Start with creating a table that mapps each GWTC entry with G event in a database. One can give Gracedb query to specify events to add to the table.

gwtc_create_from_query --service-url https://gracedb-test.ligo.org/api/ --proxy-path /path/to/your/proxy --number 4 "far < 9.65e-08 1368921618 .. 1394841618 ADVOK &~EARLY_WARNING"

The above command queries all the public events (exclusing early warning) during O4a found in GraceDB test instance. One can change the URL to https://gracedb.ligo.org/api/ to create a GWTC table for the production GraceDB instance.

Define a new set of g events for a given pipeline with hard reset

Obviously you need to change your user to be you not chad.hanna - Also, you have to be authorized to access certain features

(igwn) [chad.hanna@ldas-pcdev1 git]$ ligo-proxy-init chad.hanna
(igwn) [chad.hanna@ldas-pcdev1 git]$ gwtc_update_pipeline_gevents --reset --proxy-path /tmp/x509up_u40120 --pipeline gstlal gwtc/examples/L1-GSTLAL_AllSky-13*.xml.gz
INFO:root:Uploaded G592564
INFO:root:Uploaded G592565
INFO:root:Uploaded G592566
INFO:root:Uploaded G592567
INFO:root:Uploaded G592568
INFO:root:Uploaded G592569
INFO:root:associated super event S230522a with gevent G592564
INFO:root:associated super event S230522n with gevent G592565
INFO:root:associated super event S230525a with gevent G592566
INFO:root:associated super event S230529w with gevent G592567
INFO:root:associated super event S230726cs with gevent G592568
INFO:root:associated super event S230814me with gevent G592569
INFO:root:Uploading
{
    "S230522a": {
        "gstlal": "G592564"
    },
    "S230522n": {
        "gstlal": "G592565"
    },
    "S230525a": {
        "gstlal": "G592566"
    },
    "S230529w": {
        "gstlal": "G592567"
    },
    "S230726cs": {
        "gstlal": "G592568"
    },
    "S230814me": {
        "gstlal": "G592569"
    }
}
INFO:root:Created GWTC:
{
    "number": "4",
    "version": 9,
    "created": "2023-10-24 08:52:33 UTC",
    "submitter": "chad.hanna@ligo.org",
    "gwtc_superevents": {
        "S230522a": {
            "gstlal": "G592564"
        },
        "S230814me": {
            "gstlal": "G592569"
        },
        "S230726cs": {
            "gstlal": "G592568"
        },
        "S230522n": {
            "gstlal": "G592565"
        },
        "S230525a": {
            "gstlal": "G592566"
        },
        "S230529w": {
            "gstlal": "G592567"
        }
    }
}

Add a new gevent

(igwn) [chad.hanna@ldas-pcdev1 git]$ gwtc_update_pipeline_gevents --proxy-path /tmp/x509up_u40120 --pipeline gstlal gwtc/examples/H1-GSTLAL_AllSky-1368009034-0.xml.gz
INFO:root:Uploaded G592577
INFO:root:associated super event S230513ar with gevent G592577
INFO:root:Uploading
{
    "S230513ar": {
        "gstlal": "G592577"
    }
}
INFO:root:Created GWTC:
{
    "number": "4",
    "version": 12,
    "created": "2023-10-24 08:54:43 UTC",
    "submitter": "chad.hanna@ligo.org",
    "gwtc_superevents": {
        "S230513ar": {
            "gstlal": "G592577"
        },
        "S230525a": {
            "gstlal": "G592573"
        },
        "S230522n": {
            "gstlal": "G592572"
        },
        "S230814me": {
            "gstlal": "G592576"
        },
        "S230529w": {
            "gstlal": "G592574"
        },
        "S230522a": {
            "gstlal": "G592571"
        },
        "S230726cs": {
            "gstlal": "G592575"
        }
    }
}

Calculate the diff

(igwn) [chad.hanna@ldas-pcdev1 git]$ gwtc_diff 11 12
INFO:root:Calculating catalog diff from versions 11 to 12
INFO:root:
- new s events in version 12: ['S230513ar']
- deleted s events in version 12: []
- changed s events in version 12:

Retrieve g events

(igwn) [chad.hanna@ldas-pcdev1 git]$ gwtc_get_gevent_coinc_files --pipeline gstlal --proxy-path /tmp/x509up_u40120 --version 12
INFO:root:Retrieving g event G592577 for s event S230513ar and pipeline gstlal
	...saving as H1-GSTLAL_G592577-1368009034-0.xml
INFO:root:Retrieving g event G592573 for s event S230525a and pipeline gstlal
	...saving as L1-GSTLAL_G592573-1369017515-0.xml
INFO:root:Retrieving g event G592572 for s event S230522n and pipeline gstlal
	...saving as L1-GSTLAL_G592572-1368804652-0.xml
INFO:root:Retrieving g event G592576 for s event S230814me and pipeline gstlal
	...saving as L1-GSTLAL_G592576-1376089759-0.xml
INFO:root:Retrieving g event G592574 for s event S230529w and pipeline gstlal
	...saving as L1-GSTLAL_G592574-1369419318-0.xml
INFO:root:Retrieving g event G592571 for s event S230522a and pipeline gstlal
	...saving as L1-GSTLAL_G592571-1368783503-0.xml
INFO:root:Retrieving g event G592575 for s event S230726cs and pipeline gstlal
	...saving as L1-GSTLAL_G592575-1374366598-0.xml
(igwn) [chad.hanna@ldas-pcdev1 git]$ ls -ltrh *.xml
-rw-rw-r-- 1 chad.hanna chad.hanna 6.5K Oct 24 02:12 H1-GSTLAL_G592577-1368009034-0.xml
-rw-rw-r-- 1 chad.hanna chad.hanna 6.5K Oct 24 02:12 L1-GSTLAL_G592573-1369017515-0.xml
-rw-rw-r-- 1 chad.hanna chad.hanna 6.5K Oct 24 02:12 L1-GSTLAL_G592572-1368804652-0.xml
-rw-rw-r-- 1 chad.hanna chad.hanna 6.5K Oct 24 02:12 L1-GSTLAL_G592576-1376089759-0.xml
-rw-rw-r-- 1 chad.hanna chad.hanna 6.5K Oct 24 02:12 L1-GSTLAL_G592574-1369419318-0.xml
-rw-rw-r-- 1 chad.hanna chad.hanna 6.5K Oct 24 02:12 L1-GSTLAL_G592571-1368783503-0.xml
-rw-rw-r-- 1 chad.hanna chad.hanna 6.5K Oct 24 02:12 L1-GSTLAL_G592575-1374366598-0.xml

See latest catalog on gracedb

https://gracedb-test.ligo.org/api/gwtc/4/latest/

See previous version on gracedb

https://gracedb-test.ligo.org/api/gwtc/4/1/

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

gwtc_tools-0.1.2.tar.gz (142.7 kB view details)

Uploaded Source

Built Distribution

gwtc_tools-0.1.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file gwtc_tools-0.1.2.tar.gz.

File metadata

  • Download URL: gwtc_tools-0.1.2.tar.gz
  • Upload date:
  • Size: 142.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for gwtc_tools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b3af041cbfc1dfc2561c0ca68ef5e97fc4df3203d8b8dbc1429872a83a34b932
MD5 7bb0b50711e35f7ba125ddb32c3332b0
BLAKE2b-256 c63040913147809b6a28c7eda4e297521d730be6cbe5437249d482ed471d0423

See more details on using hashes here.

File details

Details for the file gwtc_tools-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gwtc_tools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for gwtc_tools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d5ff4412394d59475db271a042c0a2f7533de0c3bb8b510714e0aebf8dc63217
MD5 8241ea8d62786159ff4afa84fff2acca
BLAKE2b-256 8bf087897fc361e56435e9b8ee47467788870eb4bf5e413d661143397f6b38bf

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