from obspy.core import read
st = read("/bay_mobil/old_data/RJOB_2006_08_07-2006_12_13/EHZ.D/RJOB.BW.EHZ.D.300806.0000")
print st[0].stats
st = read("/bay_mobil/old_data/RJOB_2006_08_07-2006_12_13/EHZ.D/RJOB.BW.EHZ.D.300806.0000", headonly=True)
}}}
{{{
Error: 30_00800_73_2._V: Unlikely number of samples (>20000): '23090'
Exception Traceback (most recent call last)
/home/megies/ in ()
/home/megies/obspy/obspy.core/trunk/obspy/core/stream.pyc in read(pathname_or_url, format, headonly, nearest_sample, _kwargs)
160 pathname = pathname_or_url
161 for file in iglob(pathname):
--> 162 st.extend(_read(file, format, headonly, _kwargs).traces)
163 if len(st) == 0:
164 raise Exception("Cannot open file/files", pathname)
/home/megies/obspy/obspy.core/trunk/obspy/core/stream.pyc in _read(filename, format, headonly, _kwargs)
221 raise TypeError(msg + ', '.join(formats_ep.keys()))
222 if headonly:
--> 223 stream = readFormat(filename, headonly=True, _kwargs)
224 else:
225 stream = readFormat(filename, **kwargs)
/home/megies/obspy/obspy.mseed/trunk/obspy/mseed/core.pyc in readMSEED(filename, headonly, starttime, endtime, readMSInfo, reclen, quality, kwargs)
86 # read MiniSEED file
87 if headonly:
---> 88 trace_list = libmseed**.readMSHeader(filename, reclen=reclen)
89 else:
90 if platform.system() == "Windows" or quality:
/home/megies/obspy/obspy.mseed/trunk/obspy/mseed/libmseed.pyc in readMSHeader(self, filename, time_tolerance, samprate_tolerance, reclen)
562 timetol=time_tolerance,
563 sampratetol=samprate_tolerance,
--> 564 reclen=reclen)
565 # iterate through traces
566 cur = mstg.contents.traces.contents
{{{
!python
from obspy.core import read st = read("/bay_mobil/old_data/RJOB_2006_08_07-2006_12_13/EHZ.D/RJOB.BW.EHZ.D.300806.0000") print st[0].stats st = read("/bay_mobil/old_data/RJOB_2006_08_07-2006_12_13/EHZ.D/RJOB.BW.EHZ.D.300806.0000", headonly=True) }}} {{{
!python
sampling_rate: 200.0 delta: 0.005 npts: 17280063 calib: 1.0 _format: MSEED mseed: AttribDict({'dataquality': 'D', 'record_length': 512, 'encoding': 'STEIM1', 'byteorder': '>'})
Error: Cannot detect record length at byte offset 0: /bay_mobil/old_data/RJOB_2006_08_07-2006_12_13/EHZ.D/RJOB.BW.EHZ.D.300806.0000 Error: 30_00800_73_2._V: Invalid header indicator (DRQM): ' Error: 30_00800_73_2._V: Invalid channel codes: '���' Error: 30_00800_73_2._V: Unlikely start year (1920-2050): '14674' Error: 30_00800_73_2._V: Invalid start day (1-366): '19023' Error: 30_00800_73_2._V: Invalid start hour (0-23): '66' Error: 30_00800_73_2._V: Invalid start fractional seconds (0-9999): '17736'
Error: 30_00800_73_2._V: Unlikely number of samples (>20000): '23090'
Exception Traceback (most recent call last)
/home/megies/ in ()
/home/megies/obspy/obspy.core/trunk/obspy/core/stream.pyc in read(pathname_or_url, format, headonly, nearest_sample, _kwargs) 160 pathname = pathname_or_url 161 for file in iglob(pathname): --> 162 st.extend(_read(file, format, headonly, _kwargs).traces) 163 if len(st) == 0: 164 raise Exception("Cannot open file/files", pathname)
/home/megies/obspy/obspy.core/trunk/obspy/core/stream.pyc in _read(filename, format, headonly, _kwargs) 221 raise TypeError(msg + ', '.join(formats_ep.keys())) 222 if headonly: --> 223 stream = readFormat(filename, headonly=True, _kwargs) 224 else: 225 stream = readFormat(filename, **kwargs)
/home/megies/obspy/obspy.mseed/trunk/obspy/mseed/core.pyc in readMSEED(filename, headonly, starttime, endtime, readMSInfo, reclen, quality, kwargs) 86 # read MiniSEED file 87 if headonly: ---> 88 trace_list = libmseed**.readMSHeader(filename, reclen=reclen) 89 else: 90 if platform.system() == "Windows" or quality:
/home/megies/obspy/obspy.mseed/trunk/obspy/mseed/libmseed.pyc in readMSHeader(self, filename, time_tolerance, samprate_tolerance, reclen) 562 timetol=time_tolerance, 563 sampratetol=samprate_tolerance, --> 564 reclen=reclen) 565 # iterate through traces 566 cur = mstg.contents.traces.contents
/home/megies/obspy/obspy.mseed/trunk/obspy/mseed/libmseed.pyc in readFileToTraceGroup(self, filename, reclen, timetol, sampratetol, dataflag, skipnotdata, dataquality, verbose, starttime, endtime) 519 dataquality, skipnotdata, dataflag, verbose) 520 if errcode != 0: --> 521 raise Exception("Error in ms_readtraces") 522 return mstg 523
Exception: Error in ms_readtraces
}}}