Skip to content

Commit

Permalink
Merge 77620e4 into 989f812
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan Macleod committed Mar 8, 2018
2 parents 989f812 + 77620e4 commit 898fac4
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions omicron/segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@

from . import (const, data, utils)

try:
from LDAStools import frameCPP
except ImportError:
HAS_FRAMECPP = False
else:
HAS_FRAMECPP = True

STATE_CHANNEL = {
'H1:DMT-GRD_ISC_LOCK_NOMINAL:1': ('H1:GRD-ISC_LOCK_OK', [0], 'H1_R'),
'L1:DMT-GRD_ISC_LOCK_NOMINAL:1': ('L1:GRD-ISC_LOCK_OK', [0], 'L1_R'),
Expand Down Expand Up @@ -113,10 +106,12 @@ def get_state_segments(channel, frametype, start, end, bits=[0], nproc=1,
cache = data.find_frames(ifo, frametype, pstart, pend)

# optimise I/O based on type and library
if RAW_TYPE_REGEX.match(frametype) and HAS_FRAMECPP:
io_kw = {'type': 'adc', 'format': 'gwf.framecpp'}
else:
io_kw = {}
io_kw = {}
try:
from LDAStools import frameCPP
except ImportError:
if RAW_TYPE_REGEX.match(frametype):
io_kw.update({'type': 'adc', 'format': 'gwf.framecpp'})

bits = map(str, bits)
# FIXME: need to read from cache with single segment but doesn't match
Expand Down

0 comments on commit 898fac4

Please sign in to comment.