GraceDB
v0.4.0LIGO/Virgo/KAGRA gravitational-wave alerts (GraceDB), open data (GWOSC) and GCN follow-up.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_superevents
Search GraceDB superevents, newest first. Args: start: Inclusive lower bound on creation time (ISO-8601, e.g. ``2023-05-01`` or ``2023-05-01T00:00:00``). Optional. end: Inclusive upper bound on creation time (same format). Optional. max_far: Maximum false-alarm rate in Hz. Lower = more significant. A common "confident detection" threshold is ``3.2e-8`` (~1 per year). Optional. min_confidence: Minimum astrophysical probability in [0, 1], computed as ``1 - P(Terrestrial)`` from each event's p_astro file. Applied as a…
| Parameter | Type | Description |
|---|---|---|
category | string | |
end | ||
max_far | ||
max_results | integer | |
min_confidence | ||
start |
get_event_metadata
Fetch the full record and source classification for one superevent. Args: graceid: The superevent id, e.g. ``S230518h``. Returns: A dict with the raw superevent record, the available file list, the parsed source-classification probabilities (BBH / BNS / NSBH / Terrestrial) when a p_astro file has been published, and ``pipelines``: each search pipeline's best candidate (O4 onwards), so you can see which pipelines found the signal and how significant each one rated it.
| Parameter | Type | Description |
|---|---|---|
graceid * | string |
download_event_files
Download GraceDB artifacts (skymaps, p_astro, PE results, logs) for an event. These are the files GraceDB actually hosts. This is NOT raw strain data (use ``download_strain_data`` for that). Args: graceid: The superevent id, e.g. ``S230518h``. filenames: Specific filenames to download. If omitted, downloads every file attached to the superevent. Returns: A dict mapping each requested filename to the local path it was saved to, and ``resources`` mapping it to a ``gracedb://`` URI readable over MCP (files over 50 MB are local…
| Parameter | Type | Description |
|---|---|---|
graceid * | string | |
filenames |
get_event_labels
GraceDB labels on a superevent, in the order they were applied, with meanings. Labels record the event's history: data-quality checks (DQOK, DQV), human review (ADVOK, ADVNO = retracted), injections (INJ), and which products are ready (SKYMAP_READY, PE_READY). Args: graceid: The superevent id, e.g. ``S190814bv``.
| Parameter | Type | Description |
|---|---|---|
graceid * | string |
audit_alerts
Audit the public alerts of a period: how many, how many retracted, how fast, and by whom. Counts all superevents created in the period, the significant public alerts (label GCN_PRELIM_SENT) and the alerts sent only as low-significance (LOW_SIGNIF_PRELIM_SENT, O4 onwards). Breaks the significant alerts down by detector network, pipeline and search, and lists every retracted superevent (ADVNO) with the hours from creation to retraction. GraceDB does not record why an alert was retracted: read the LVK retraction circular (``search_gcn_circulars``). Args: star…
| Parameter | Type | Description |
|---|---|---|
end * | string | |
start * | string | |
category | string |
search_catalog_events
Search published gravitational-wave events in the GWOSC catalogues. Unlike GraceDB alerts, catalogue events are vetted detections with estimated source parameters. Each event appears once, in its newest version. Args: catalog: Restrict to one catalogue, e.g. ``GWTC-1-confident``, ``GWTC-2.1-confident``, ``GWTC-3-confident``, ``GWTC-4.0``. Omit for all. gps_start: Earliest event GPS time. Optional. gps_end: Latest event GPS time. Optional. min_snr: Minimum network matched-filter SNR (louder signals are clearer). min_p_astro: Mini…
| Parameter | Type | Description |
|---|---|---|
catalog | ||
gps_end | ||
gps_start | ||
max_distance_mpc | ||
max_results | integer | |
max_total_mass | ||
min_p_astro | ||
min_snr | ||
min_total_mass |
get_catalog_event
Source parameters for one published event, with 90% credible intervals. Args: name: A catalogue name such as ``GW150914`` or ``GW200129_065458``, or a GraceDB superevent id such as ``S190814bv`` (matched by GPS time). Returns: Masses, distance, redshift, spin, SNR, FAR and p_astro as ``{value, interval_90}``, plus the GraceDB id, available strain files, parameter-estimation sets and the GWOSC event page.
| Parameter | Type | Description |
|---|---|---|
name * | string |
search_gcn_circulars
Search NASA GCN Circulars: rapid reports from telescopes, satellites and neutrino detectors about transients, including follow-up of gravitational-wave alerts. Reports name gravitational-wave events by their GraceDB id (``S230518h``), so a catalogue name such as ``GW190814`` is also searched as ``S190814bv``. Args: event: An event name: GraceDB id (``S230518h``), GW name (``GW170817``), GRB (``GRB 230518A``), IceCube alert (``IceCube-261020A``), etc. Matches circulars with the name in their subject, i.e. reports about the event. query:…
| Parameter | Type | Description |
|---|---|---|
end_date | ||
event | ||
include_bodies | boolean | |
max_results | integer | |
page | integer | |
query | ||
sort | string | |
start_date |
get_gcn_circular
Full text of one GCN Circular, with its links (GCN page, ADS for citation). Args: circular_id: The circular number, e.g. ``33813``.
| Parameter | Type | Description |
|---|---|---|
circular_id * | integer |
download_strain_data
Download public strain time series around an event from GWOSC. IMPORTANT: GraceDB does not host raw strain. This tool reads the event GPS time (``t_0``) from GraceDB, then fetches open strain from GWOSC. It only succeeds for events whose data has been publicly released (past observing runs); fresh low-latency alerts will not have public strain yet. Requires the optional ``gwpy`` dependency (``pip install gracedb-mcp[strain]``). Args: graceid: The superevent id, e.g. ``S190814bv``. When ``gps_time`` is given this is only used as the output folder n…
| Parameter | Type | Description |
|---|---|---|
graceid * | string | |
detectors | ||
duration | number | |
gps_time | ||
sample_rate | integer |
utc_to_gps
Convert an ISO-8601 UTC timestamp to GPS seconds (handy for building queries). Args: iso_timestamp: e.g. ``2015-09-14T09:50:45`` (UTC assumed if no tz given).
| Parameter | Type | Description |
|---|---|---|
iso_timestamp * | string |
check_data_availability
Check which detectors have public GWOSC strain data for a time span. Call this before ``download_strain_data``. Public strain exists only for released observing runs, and detectors are often offline, so coverage is frequently partial. Args: gps_start: Start of the span in GPS seconds. Use together with ``gps_end``. gps_end: End of the span in GPS seconds, at most 7 days after ``gps_start``. event: Instead of a span, a GraceDB superevent id (``S190814bv``) or a catalogue name (``GW150914``); checks ``window`` seconds centred on it. w…
| Parameter | Type | Description |
|---|---|---|
detectors | ||
event | ||
gps_end | ||
gps_start | ||
window | number |
list_observing_runs
Observing runs whose data GWOSC has publicly released, oldest first. Args: gps: Optional GPS time; the answer says which released run covers it, or that it falls outside every released run (detectors off, or data not public yet). Returns: Each run's name, GPS and UTC span, detectors and dataset DOI (cite it when using the data).
| Parameter | Type | Description |
|---|---|---|
gps |
check_data_quality
Data-quality flags for each detector over a span, from GWOSC. Flags say whether data passes each search's vetoes: CBC (compact binaries), BURST, CW (continuous waves) and STOCH (stochastic background), at categories CAT1 (most basic checks) to CAT3 (strictest). ``NO_<search>_HW_INJ`` flags mark time free of hardware injections, simulated signals physically added to the detector. CW injections are weak, long-lasting signals present for much of each run; they matter for continuous-wave searches, not for transients such as compact-binary mergers. Args: gps_st…
| Parameter | Type | Description |
|---|---|---|
detectors | ||
event | ||
gps_end | ||
gps_start | ||
window | number |
analyze_skymap
Analyse a gravitational-wave sky map: how big the localisation is, how far away, and how likely given sky positions or telescope fields are to contain the source. Args: graceid: Superevent id, e.g. ``S230518h``. filename: Sky map to use, e.g. ``bayestar.multiorder.fits``. Defaults to the most recently uploaded one; later maps (Bilby, publication maps) are usually more accurate than the rapid BAYESTAR map. positions: Up to 100 sky positions (e.g. candidate host galaxies or optical transients) to check. fields: Up to 20…
| Parameter | Type | Description |
|---|---|---|
graceid * | string | |
fields | ||
filename | ||
positions |