This section provides Python sample code for receiving and interacting with GCN Notices. GCN Notices are available over several different protocols and in several different formats. LIGO/Virgo 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. GCN produces several other legacy formats from them, in particular a text-based “full format” and binary format. LIGO/Virgo 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 GCN notices that are sent every hour. The tutorial is broken into the following subsections: