Skip to main content

gocart

gocart is a python package and command-line suite used to consume GCN Kafka streams..

Documentation for gocart is hosted by Read the Docs (development version and main version). The code lives on github. Please report any issues you find here.

Features

  • Listen to GCN Kafka streams (currently LIGO-Virgo-KAGRA only) and write alerts and skymaps to the local filesystem.
  • Ability to 'echo' the Kafka stream by re-listening to the last N days of alerts (provided the alerts are still hosted on the GCN Kafka cluster).
  • Alert content, FITS Header data and some extra value-added event parameters are written to a single machine-readable YAML file.
  • The healpix skymaps are optionally converted to ascii files (one row per healpix pixel) and/or rendered as aitoff plots.

Installation

The easiest way to install gocart is to use conda:

conda create -n gocart python=3.9 pip gocart -c conda-forge
conda activate gocart

To upgrade to the latest version of gocart use the command:

conda upgrade gocart -c conda-forge

It is also possible to install via pip if required:

pip install gocart

Or you can clone the github repo and install from a local version of the code:

git clone git@github.com:thespacedoctor/gocart.git
cd gocart
python setup.py install

To check installation was successful run gocart -v. This should return the version number of the install.

Initialising gocart

Before using gocart you need to use the init command to generate a user settings file. Running the following creates a yaml settings file in your home folder under ~/.config/gocart/gocart.yaml:

gocart init

The file is initially populated with gocart's default settings which can be adjusted to your preference.

If at any point the user settings file becomes corrupted or you just want to start afresh, simply trash the gocart.yaml file and rerun gocart init.

GCN Kafka Credentials

When you first come to use gocart, you will need to add a GCN Kafka Client ID and Secret to the gocart.yaml settings file. To get these credentials you will need to signup for a GCN Notices account here.

Once signed in, fill in a suitable name for your new client (any name will do, so gocart is as good a name as any). Fill in the captcha and click 'Create New Credentials'.

In the 'Customize Alerts' section, don't be concerned about what Notice Types to select as these are only used to generate template code in the next section. Not selecting any is fine. Click the 'Generate Code' button. You will now be presented with your newly created client credentials within the body of the code snippet:

Open your gocart settings file at ~/.config/gocart/gocart.yaml and copy and paste these credentials into the appropriate place.

Don't worry about the group_id parameter, it's initially set to XXXX but gocart will replace this with a unique value when it's first run. It is this group_id that allows GCN Kafka to remember which alerts you have or have not heard before. Note the example client above has been deleted, so the credentials quoted here will not work.

You are now ready to start using gocart.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gocart-0.1.8.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gocart-0.1.8-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file gocart-0.1.8.tar.gz.

File metadata

  • Download URL: gocart-0.1.8.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.13.0 pkginfo/1.9.6 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.8.16

File hashes

Hashes for gocart-0.1.8.tar.gz
Algorithm Hash digest
SHA256 07975a896039e84f03484418e17668be1036a7559fd5a5cf8970c907e15f5f69
MD5 2035c20e48d4c592b33a3753d029d3c7
BLAKE2b-256 8e279e54413754e00f0e4ea9c9d90a6f6fd84c59ac64207160e334093d5512ee

See more details on using hashes here.

File details

Details for the file gocart-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: gocart-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 40.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.13.0 pkginfo/1.9.6 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.8.16

File hashes

Hashes for gocart-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8a19e74f62d1fa0053cfdd730b0f242191bfaeb64235ae9c7d770381556abe1e
MD5 3d1f1a694606363559267bcd281f3ee9
BLAKE2b-256 70de54b2497f91e640c873bf2fb5d7c8b60228af728a89242d08fa2a848e17f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page