Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve email output format #54

Open
habig opened this issue Jun 2, 2023 · 0 comments
Open

Improve email output format #54

habig opened this issue Jun 2, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@habig
Copy link

habig commented Jun 2, 2023

The alert email should be carefully formatted to be human-friendly and polite to the experiments.

The code is in cs_email.py, the snews_email function, building the pretty_alert string that gets sent as an email.

Will attempt to use markdown here to make an example. Let's settle on what it looks like before trying to code it.

Subject: SNEWS2-test SNEWS COINCIDENCE 2023-06-02T08:23:09.833793

Need a better subject line, but one which preserves a timestamp so we can sort t them out while developing. For humans, should we parse out that ANSI time?

Note that this couples to the as yet to be written up issue where we want to make a web page for each alert to provide updates, links to skymaps, etc.

The Supernova Early Warning System reports that the following experiments observed a Supernova neutrino-like signal within 10 seconds of each other:
XENONnT at 2012-06-09T15:31:08.109876 with a probability of None
DS-20K at 2012-06-09T15:31:08.109876 with a probability of None
KamLAND at 2012-06-09T15:31:08.891011 with a probability of None

reported by SNEWS server at avogadro.physics.purdue.edu, which estimates a False Alarm Rate of 0.00%

More information on this alert (including directional information) will be kept at https://snews2.org/alerts/2023-06-02T08:23:09.831463

Internal SNEWS information follows:
_id : SNEWS_Coincidence_ALERT-UPDATE 2023-06-02T08:23:09.831463
alert_type : NEW_MESSAGE
p_values average : nan
sub list number : 2

Currently, here's what it says:

_id : SNEWS_Coincidence_ALERT-UPDATE 2023-06-02T08:23:09.831463
alert_type : NEW_MESSAGE
server_tag : avogadro.physics.purdue.edu
False Alarm Prob : 0.00%
detector_names : ['XENONnT', 'DS-20K', 'KamLAND']
sent_time : 2023-06-02T08:23:09.831463
p_values : [None, None, None]
neutrino_times : ['2012-06-09T15:31:08.109876',
'2012-06-09T15:31:08.109876', '2012-06-09T15:31:08.891011']
p_values average : nan
sub list number : 2

@habig habig added the enhancement New feature or request label Jun 2, 2023
@justinvasel justinvasel self-assigned this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants