# http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg----------
raise GSE1LoadError( '"XW01" marker not found, maybe this is not a GSE1 file')
raise EOF()
system_type, data_format, diff_flag) = util.unpack_fixed( 'a4,x1,a17,x1,i3,x1,i8,x1,a6,x1,a8,x1,a2,x1,f11,x1,a6,x1,a4,x1,i1', line[:80])
raise GSE1LoadError('"WID1" marker expected but not found.')
beam_slowness, horizontal_orientation) = util.unpack_fixed( 'f9,i1,f7,x1,f9,x1,f9,x1,f9,x1,f9,x1,f7,x1,f7,x1,f6', line[:80])
system_type, data_format, diff_flag, gain, units, calib_period, lat, lon, elevation, depth, beam_azimuth, beam_slowness, horizontal_orientation)
raise GSE1LoadError('"DAT1" marker expected but not found.')
else: raise GSE1LoadError( 'GSE1 data format %s with differencing=%i not supported.' % (data_format, diff_flag))
raise GSE1LoadError('"CHK1" marker expected but not found.')
except Exception: raise GSE1LoadError('could not parse CHK1 section')
dat1 = f.readline()[:4] if dat1 != 'DAT1': raise GSE1LoadError('"DAT1" marker expected but not found.')
while True: if f.readline().startswith('CHK1'): break
f.readline()
diff_flag, gain) = h[:10]
f, data_format, diff_flag, nsamples) else: skip_dat1_chk1(f, data_format, diff_flag, nsamples) ydata = None tmax = tmin + (nsamples-1)*deltat
'', sta, '', cha, tmin=tmin, tmax=tmax, deltat=deltat, ydata=ydata)
lines[0].startswith(b'XW01') and lines[2].startswith(b'WID1') and \ lines[4].startswith(b'DAT1'):
if __name__ == '__main__': all_traces = [] for fn in sys.argv[1:]: all_traces.extend(iload(fn))
trace.snuffle(all_traces) |