This script will continuously listen to the GCN notice stream, filtering only notices originating from Ligo-Virgo. If an event is detected, and a skymap is referenced in the VOEvent packet, the script will immediately download a local copy of the HealPix localisation map.
Python 2.* only at the minute.
Here are the only dependencies you should need to install:
pip install fundamentals requests pygcn
Within the script itself you can set the download path for the maps:
# VARIABLES
downloadPath = "/tmp/ligo_virgo_events"
A folder for each event will be created under this path to contain its associated localisation maps.
To run in production mode:
python lvc_gcn_listener.py
or to run in test mode and download maps from the GCN test stream use the -t
flag:
python lvc_gcn_listener.py -t
The LVC GCN test stream usually reports one test event / hour.
Note real event IDs start with S (superevent) and test event IDs begin with MS (mock-superevent).
To control the level of logging and where the script writes log files to, use the template settings.yaml
file provided in this gist. There are some comments in the settings file to help you taylor it to your needs.
To run the script with settings:
python lvc_gcn_listener.py /path/to/settings.yaml