Commit f45e74cf authored by Roberto De Pietri's avatar Roberto De Pietri

Merge branch 'master' into NoticeValidation

parents b607780f 9d90feb4
Pipeline #123385 failed with stages
in 7 minutes and 16 seconds
......@@ -20,6 +20,11 @@ Changelog
- Update the documentation on RAVEN functions and external triggers flow
chart.
- Change BAYESTAR low frequency cutoff from 30 Hz (the default value) to
15 Hz.
- Change playground configuration to read O3 replay data from O2 replay data.
0.12.3 (2020-03-24)
-------------------
......
......@@ -28,7 +28,7 @@
"sha256:5b26757dc6f79a3b7dc9fab95359328d5747fcb2409d331ea66d0272b90ab2a0",
"sha256:8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71"
],
"markers": "sys_platform == 'darwin'",
"markers": "platform_system == 'Darwin'",
"version": "==0.1.0"
},
"astroplan": {
......@@ -573,10 +573,10 @@
},
"ligo-followup-advocate": {
"hashes": [
"sha256:79edd633b6e348004b05b0bc6ea22e5233ec625442c18013bb30128fd34f9621",
"sha256:e7947d697933a80f2261dae51d7c48f3f151e2e65a358d455c406612447299f6"
"sha256:1c5fc183f9d5e7afc2dfdbf698e7be6ca038d537445ed38af3beb21b8896fd85",
"sha256:def404a468ff4d8dc22c4caf16c21578aafc7627250b091e157d8b4b9cabc2a7"
],
"version": "==1.1.7"
"version": "==1.1.8"
},
"ligo-gracedb": {
"hashes": [
......
......@@ -173,9 +173,9 @@ uses_gatedhoft = {'gstlal': True,
"""Whether or not a pipeline uses gated h(t). Determines whether or not
the DMT-DQ_VECTOR will be analyzed for data quality."""
llhoft_glob = '/dev/shm/kafka/{detector}_O2/*.gwf'
llhoft_glob = '/dev/shm/kafka/{detector}_O3/*.gwf'
"""File glob for playground low-latency h(t) frames. Currently points
to O2 replay data."""
to O3 replay data."""
llhoft_channels = {
'H1:DMT-DQ_VECTOR': 'dmt_dq_vector_bits',
......@@ -188,7 +188,7 @@ of a channel and its bitmask, as defined in :mod:`gwcelery.tasks.detchar`."""
idq_channels = ['H1:IDQ-PGLITCH_OVL_32_2048',
'L1:IDQ-PGLITCH_OVL_32_2048']
"""Low-latency iDQ p(glitch) channel names from O2 replay."""
"""Low-latency iDQ p(glitch) channel names from O3 replay."""
idq_pglitch_thresh = 0.95
"""If P(Glitch) is above this threshold, and
......@@ -214,9 +214,9 @@ idq_veto = {'gstlal': False,
Currently all False, pending iDQ review (should be done before O3).
"""
low_latency_frame_types = {'H1': 'H1_O2_llhoft',
'L1': 'L1_O2_llhoft',
'V1': 'V1_O2_llhoft'}
low_latency_frame_types = {'H1': 'H1_O3_llhoft',
'L1': 'L1_O3_llhoft',
'V1': 'V1_O3_llhoft'}
"""Types of low latency frames used in Parameter Estimation (see
:mod:`gwcelery.tasks.inference`) and in cache creation for detchar
checks (see :mod:`gwcelery.tasks.detchar`).
......@@ -226,13 +226,13 @@ high_latency_frame_types = {'H1': None,
'L1': None,
'V1': None}
"""Types of high latency frames used in Parameter Estimation and in cache
creation for detchar checks. They do not exist for O2Replay data. (see
creation for detchar checks. They do not exist for O3Replay data. (see
:mod:`gwcelery.tasks.inference` and :mod:`gwcelery.tasks.detchar`)
"""
strain_channel_names = {'H1': 'H1:GDS-CALIB_STRAIN_O2Replay',
'L1': 'L1:GDS-CALIB_STRAIN_O2Replay',
'V1': 'V1:Hrec_hoft_16384Hz_O2Replay'}
strain_channel_names = {'H1': 'H1:GDS-CALIB_STRAIN_O3Replay',
'L1': 'L1:GDS-CALIB_STRAIN_O3Replay',
'V1': 'V1:Hrec_hoft_16384Hz_O3Replay'}
"""Names of h(t) channels used in Parameter Estimation (see
:mod:`gwcelery.tasks.inference`) and in detchar omegascan creation
(see :mod:`gwcelery.tasks.detchar`)."""
......
......@@ -3,6 +3,7 @@ from threading import Thread
from celery import bootsteps
from celery.utils.log import get_logger
from imapclient import IMAPClient
from imapclient.exceptions import IMAPClientAbortError
from safe_netrc import netrc
from .signals import email_received
......@@ -36,19 +37,24 @@ class Receiver(EmailBootStep):
def _runloop(self):
username, _, password = netrc().authenticators(self._host)
with IMAPClient(self._host, use_uid=True) as conn:
conn.login(username, password)
conn.select_folder('inbox')
while self._running:
messages = conn.search()
for msgid, data in conn.fetch(messages, ['RFC822']).items():
email_received.send(None, rfc822=data[b'RFC822'])
conn.delete_messages(msgid)
conn.idle()
responses = []
while self._running and not responses:
responses = conn.idle_check(timeout=5)
conn.idle_done()
while self._running:
try:
with IMAPClient(self._host, use_uid=True) as conn:
conn.login(username, password)
conn.select_folder('inbox')
while self._running:
messages = conn.search()
for msgid, data in conn.fetch(
messages, ['RFC822']).items():
email_received.send(None, rfc822=data[b'RFC822'])
conn.delete_messages(msgid)
conn.idle()
responses = []
while self._running and not responses:
responses = conn.idle_check(timeout=5)
conn.idle_done()
except IMAPClientAbortError:
log.exception('IMAP connection aborted')
def create(self, consumer):
super().create(consumer)
......
......@@ -74,7 +74,9 @@ def localize(coinc_psd, graceid, filename='bayestar.fits.gz',
# Run BAYESTAR
log.info('starting sky localization')
skymap = _bayestar.localize(event)
# FIXME: the low frequency cutoff should not be hardcoded.
# It should be provided in the coinc.xml file.
skymap = _bayestar.localize(event, f_low=15.0)
skymap.meta['objid'] = str(graceid)
skymap.meta['url'] = '{}/{}'.format(base_url, graceid)
log.info('sky localization complete')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment