Skip to content

Commit

Permalink
segments: sieve cache before reading
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmmacleod committed Mar 14, 2017
1 parent 5c90a58 commit 30430c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions omicron/segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ def get_state_segments(channel, frametype, start, end, bits=[0], nproc=1,
csegs = cache.to_segmentlistdict()[ifo[0]]
except KeyError:
return segs
for s, e in csegs & span:
sv = StateVector.read(cache, channel, nproc=nproc, start=s, end=e,
for seg in csegs & span:
scache = cache.sieve(segment=seg)
s, e = seg
sv = StateVector.read(scache, channel, nproc=nproc, start=s, end=e,
bits=bits, gap='pad', pad=0).astype('uint32')
segs += sv.to_dqflags().intersection().active
# truncate to integers, and apply padding
Expand Down

0 comments on commit 30430c1

Please sign in to comment.