Open smaldera opened 8 years ago
Ok, I changed the logic slightly, now it looks like
if header != xpeEventWindowed.HEADER_MARKER:
msg = 'Event header mismatch at byte %d' % self.tell()
msg += ' (expected %s, got %s).' %\
(hex(xpeEventWindowed.HEADER_MARKER), hex(header))
logger.error(msg)
logger.info('Moving ahead to the next event header...')
while header != xpeEventWindowed.HEADER_MARKER:
header = self.read_word()
logger.info('Got back in synch at byte %d.' % self.tell())
Tested on the actual file---the output is
binio:INFO >> Opening input binary file /data/work/xpedata/reference/xpol_2081.mdat...
binio:ERROR >> Event header mismatch at byte 941230 (expected 0xffff, got 0xdfff).
binio:INFO >> Moving ahead to the next event header...
binio:INFO >> Got back in synch at byte 942394.
running the reconstruction on run xpol_2081.mdat (http://naslab1.iaps.inaf.it/data/Projects/Gas_Pixel_Detector/RunID/xpol_2081.mdat?nossi=1) it stops on event 721 whit this message: "binio:ERROR >> Event header mismatch (got 0xdfff)."