An alert application for observing supernovae with the SNEWS detector network.
Docs: | https://hop-snalert-app.readthedocs.io/en/latest/ |
- Python 3.6 or above
This is an alert application that extends the SCiMMA hop-client using the hop-client cookiecutter template. This application monitors the observations published by detectors in the SuperNova Early Warning System (SNEWS) network, and can optionally send alerts upon the detection of a potential supernova.
The application consists of:
- storage - data structure to store recent messages and remove old messages
- decider - applies message parsing logic to decide if incoming messages indicate a supernova
- model - instantiates a decider object and connects to SCiMMA HOPSKOTCH message streams; passes messages using hop.stream to the decider; publishes an alert message if the decider indicates a supernova
The application utilizes the hop-plugin-snews
plugin to provide custom message formats: see the repository and [documentation] for more details about this format, and see the hop-client message formats for information on specifying other custom formats.
With appropriate HOPSKOTCH authentication, a user can use the application to publish and subscribe to the online topic "snews-TOPIC".
- pip:
python3 -m venv demo-venv
source demo-venv/bin/activate
- conda:
conda create --name demo-venv python=3.7 conda activate demo-venv
- pip
pip install git+https://github.com/RiceAstroparticleLab/hop-SNalert-app.git
- running the app:
snews model --env-file example.env --no-auth
- generating test messages:
snews generate --env-file example.env --rate 0.5 --alert-probability 0.1 --persist --no-auth
For a full tutorial on how to set up the application with local message streams, follow the guide here: https://github.com/RiceAstroparticleLab/hop-SNalert-app/blob/demo/tutorial/snews-local-tutorial.md
For a full tutorial on how to set up the application with the SCiMMA HOPSKOTCH network and request HOPSKOTCH credentials, follow the guide here: https://github.com/RiceAstroparticleLab/hop-SNalert-app/blob/demo/tutorial/snews-dev-tutorial.md.