This section provides Python sample code for receiving and interacting with Notices. Notices are available over several different protocols and in several different formats. LIGO/Virgo/KAGRA recommends using the VOEvent Transport Protocol (VTP) to receive notices in VOEvent XML format because it is anonymous, configuration-free, and easy to parse.
The VOEvent XML alerts are official data products of LIGO/Virgo/KAGRA. GCN produces several other legacy formats from them, in particular a text-based “full format” and binary format. LIGO/Virgo/KAGRA performs only limited quality control of the legacy formats.
This tutorial will walk you through writing a Python script to receive and process the example LIGO/Virgo/KAGRA notices that are sent every hour. The tutorial is broken into the following subsections: