Skip to content

Commit

Permalink
Another approach to try and deal with format changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaycedowell committed Oct 17, 2022
1 parent 18842ee commit 8f27e83
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions lsl/reader/ldp.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,30 +934,30 @@ def _describe_file(self):
pols = []
tuning1 = 0.0
tuning2 = 0.0
for i in range(64):
for i in range(32):
try:
junkFrame = self.read_frame()
except errors.SyncError:
continue
except errors.EOFError:
junkFrame0 = self.read_frame()
junkFrame1 = self.read_frame()
except (errors.SyncError, errors.EOFError):
break
b,t,p = junkFrame.id
srate = junkFrame.sample_rate
if b not in beams:
beams.append(b)
if t not in tunes:
tunes.append(t)
if p not in pols:
pols.append(p)

if t == 1:
tuning1 = junkFrame.central_freq
else:
tuning2 = junkFrame.central_freq

for junkFrame in (junkFrame0, junkFrame1):
b,t,p = junkFrame.id
srate = junkFrame.sample_rate
if b not in beams:
beams.append(b)
if t not in tunes:
tunes.append(t)
if p not in pols:
pols.append(p)

if t == 1:
tuning1 = junkFrame.central_freq
else:
tuning2 = junkFrame.central_freq

if i == 0:
start = junkFrame.time
startRaw = junkFrame.payload.timetag - junkFrame.header.time_offset
start = junkFrame0.time
startRaw = junkFrame0.payload.timetag - junkFrame0.header.time_offset

self.description = {'size': filesize, 'nframe': nFramesFile, 'frame_size': drx.FRAME_SIZE,
'nbeampol': beampols, 'beam': b,
Expand Down

0 comments on commit 8f27e83

Please sign in to comment.