-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add SNEWSMessage class hierarchy. #81
Conversation
@KaraMelih , I've been sitting on this PR but I think it's ready for you to at least look at. The new
It will generate several JSON outputs and demonstrate construction of messages for the different tiers. Notes:
|
Hi Segev, I hope you don't mind, I played around a little. \ I also added a time check for each time input in the time series list. I added the Publisher also directly in this module. In the existing version, if you create two messages for two different tiers, the main arguments of one message is considered to be the Example, before doing this change: SNEWSCoincidenceTierMessage
---------------------------
_id : LZ_CoincidenceTier_2023-06-26T15:29:47.598698
schema_version : 1.3.0
detector_name : LZ
neutrino_time : 2023-06-26T15:29:47.598698
--------------------------- meta fields
p_values : [0.0007, 0.0008, 0.0009]
t_bin_width : 0.07
is_test : True and SNEWSSignificanceTierMessage
----------------------------
_id : LZ_SignificanceTier_2023-06-26T15:29:47.598698
schema_version : 1.3.0
detector_name : LZ
p_values : [0.0007, 0.0008, 0.0009]
t_bin_width : 0.07
---------------------------- meta fields
neutrino_time : 2023-06-26T15:29:47.598698
p_val : 0.0007
is_test : True Where obviously |
Still need to test the
this still creates a message, and fails at a later stage when you try to send it. More dangerous is; msg = messages.SNEWSMessageBuilder(detector_name=9999) is also valid, and it sends it to snews without problem. So I think at the least the detector name should also be validated |
Thanks for checking, obviously both checks should be implemented. Could be done by the message builder or the message classes if we don't want invalid detectors to even be built into a message. |
full integration
@KaraMelih , I merged in your changes but didn't notice that with the new requirement of |
This is ready to merge but we need snews_cs to properly recognize the meta field altered in this PR. We will hold off the merger until that's complete. |
@KaraMelih confirms that snews_cs has a fix for the meta issue and we can merge this PR. |
PR for a new branch to address issue #73.