diff --git a/ess/TraceWin.py b/ess/TraceWin.py index 758d2817098d3bb5ec5b80109bb10d133b5c4a0f..45ddf39ca214ffbe4d79608bfc4db50cdb18a4ba 100644 --- a/ess/TraceWin.py +++ b/ess/TraceWin.py @@ -628,6 +628,8 @@ class density_file: while self.i<counter: self._getFullContent() self.i+=1 + if sys.flags.debug and self.i%100 == 0: + print('Read status',self.i) def _getHeader(self): @@ -669,15 +671,20 @@ class density_file: numpy.fromfile(self.fin, dtype=numpy.int16, count=356//2) else: raise TypeError("It is not possible to read this format..") + elif self.Nrun>1: + #WARN not 100% sure if this is correct.. + if self.version<=9: + numpy.fromfile(self.fin, dtype=numpy.int16, count=((5588+self.Nrun*12)//2)) + elif self.version==10: + numpy.fromfile(self.fin, dtype=numpy.int16, count=((20796+self.Nrun*12)//2)) + else: + raise TypeError("It is not possible to read this format..") elif self.version==8: numpy.fromfile(self.fin, dtype=numpy.int16, count=12344//2) elif self.version==9: numpy.fromfile(self.fin, dtype=numpy.int16, count=12352//2) elif self.version==10: numpy.fromfile(self.fin, dtype=numpy.int16, count=12408//2) - elif self.Nrun>1: - #WARN not 100% sure if this is correct.. - numpy.fromfile(self.fin, dtype=numpy.int16, count=((5588+self.Nrun*12)/2)) else: raise TypeError("It is not possible to read this format..")