SNEWS2 / SNEWS_Publishing_Tools

Publishing Tool for SNEWS
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

update on the snews tier publisher #27

Closed KaraMelih closed 2 years ago

KaraMelih commented 2 years ago
from SNEWS_PT.snews_pub import SNEWSTiersPublisher
snews = SNEWSTiersPublisher(detector_name='KamLAND', timing_series=['4:31:05:565', '4:31:05:575', '4:31:05:585'],
                                                  p_val=0.000007, p_values=[0.000007, 0.000004], machine_time='22/02/08 4:31:08:565')

can be further investigated before submitting a message i.e.

print(snews.messages)
print(snews.tiernames)

and finally snews.send_to_snews() submits the message.

Alternatively;

from SNEWS_PT.snews_pub import SNEWSTiersPublisher
snews = SNEWSTiersPublisher().from_json('myjsonfile.json')
snews.send_to_snews()
KaraMelih commented 2 years ago

@Storreslara Today we were working on your branch which is why I created this PR for your branch. Once a PR is created it is easier to compare the changes. Could you please have a look and maybe we can go over the lines by commenting?

KaraMelih commented 2 years ago

In this 5cb1ac37ff1d4d6533280d56f64a209d1b5ce2e4 commit, I changed the key 'nu_time' to 'neutrino_time' and also 'p_value' to 'p_val'