PrerequisitesΒΆ
In order to run this sample code, you will need Python >= 3.5 on a Unix-like operating system (Linux or macOS) and a few third-party Python packages:
- PyGCN for connecting to GCN (alternatives: comet)
- lxml for parsing VOEvent XML packets (see also the voevent-parse and VOEventLib helper libraries, both of which are based on lxml)
- Healpy for decoding HEALPix coordinates (alternatives: astropy-healpix, the official C/C++/Fortran/Java/IDL HEALPix bindings for HEALPix, DS9, Aladin)
- astropy for astronomical coordinate transformations, observability, etc.
- numpy and matplotlib, popular math and plotting packages for Python
If you are on a Mac and use the MacPorts package manager, you can install all of the above with the following command:
$ sudo port install py37-gcn py37-healpy
Otherwise, the fastest way to install the dependencies is with pip, a package
manager that comes with most Python distributions. To install these packages
with pip
, run the following command:
$ pip install pygcn healpy
Another option is the Anaconda Python distribution. To install these packages using Anaconda, first install conda and then run the following commands:
$ conda config --add channels conda-forge
$ conda install pygcn healpy