コード例 #1
0
ファイル: slpacket.py プロジェクト: xinzhou1006/obspy
 def get_ms_record(self):
     # following from obspy.io.mseed.tests.test_libmseed.py -> test_msrParse
     msr = clibmseed.msr_init(None)
     pyobj = from_buffer(self.msrecord, dtype=np.int8)
     errcode = \
         clibmseed.msr_parse(pyobj, len(pyobj), C.pointer(msr), -1, 1, 1)
     if errcode != 0:
         msg = "failed to decode mini-seed record: msr_parse errcode: %s"
         raise SeedLinkException(msg % (errcode))
     # print "DEBUG: msr:", msr
     msrecord_py = msr.contents
     # print "DEBUG: msrecord_py:", msrecord_py
     return msr, msrecord_py
コード例 #2
0
ファイル: slpacket.py プロジェクト: Brtle/obspy
 def get_ms_record(self):
     # following from obspy.io.mseed.tests.test_libmseed.py -> test_msrParse
     msr = clibmseed.msr_init(None)
     pyobj = from_buffer(self.msrecord, dtype=np.int8)
     errcode = \
         clibmseed.msr_parse(pyobj, len(pyobj), C.pointer(msr), -1, 1, 1)
     if errcode != 0:
         msg = "failed to decode mini-seed record: msr_parse errcode: %s"
         raise SeedLinkException(msg % (errcode))
     # print "DEBUG: msr:", msr
     msrecord_py = msr.contents
     # print "DEBUG: msrecord_py:", msrecord_py
     return msr, msrecord_py