From 0356b80291307c5719ec71ccdc1007811a22d6f6 Mon Sep 17 00:00:00 2001 From: Duncan Macleod Date: Wed, 7 Jun 2017 00:34:57 -0700 Subject: [PATCH 1/2] data: only match LIGO llhoft for /dev/shm Virgo llhoft doesn't use `/dev/shm` at CIT --- omicron/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omicron/data.py b/omicron/data.py index eb9ad1f..c142851 100644 --- a/omicron/data.py +++ b/omicron/data.py @@ -30,7 +30,7 @@ from glue.lal import (Cache, CacheEntry) from glue.segments import (segment as Segment, segmentlist as SegmentList) -re_ll = re.compile('\A[A-Z]\d_ll') +re_ll = re.compile('\A[HL]1_ll') re_gwf_gps_epoch = re.compile('[-\/](?P\d+)$') From 9ee338b399a2f09f67cc79166ab1a8b0514234fe Mon Sep 17 00:00:00 2001 From: Duncan Macleod Date: Wed, 7 Jun 2017 00:35:28 -0700 Subject: [PATCH 2/2] data: don't return most recent llhoft GWF file might still be being written, so may end up corrupt --- omicron/data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omicron/data.py b/omicron/data.py index c142851..655f875 100644 --- a/omicron/data.py +++ b/omicron/data.py @@ -301,4 +301,5 @@ def _find_ll_frames(ifo, frametype, root='/dev/shm'): obs = ifo[0] globstr = os.path.join(root, frametype, ifo, '%s-%s_%s-*-*.gwf' % (obs, ifo, frametype)) - return Cache.from_urls(glob.glob(globstr)) + # don't return the last file, as it might not have been fully written yet + return Cache.from_urls(sorted(glob.glob(globstr)[:-1]))