def test_issue_358(self): """ Test case for issue #358. """ filename = os.path.join(self.path, 'CL.AIO.dataless') parser = Parser() parser.read(filename) dt = UTCDateTime('2012-01-01') parser.get_paz('CL.AIO.00.EHZ', dt)
def test_issue165(self): """ Test cases related to #165: - number of poles or zeros can be 0 - an unsupported response information somewhere in the metadata should not automatically raise an Error, if the desired information can still be retrieved """ parser = Parser(strict=True) file = os.path.join(self.path, "bug165.dataless") t = UTCDateTime("2010-01-01T00:00:00") parser.read(file) paz = parser.get_paz("NZ.DCZ.20.HNZ", t) result = { 'digitizer_gain': 419430.0, 'gain': 24595700000000.0, 'poles': [(-981 + 1009j), (-981 - 1009j), (-3290 + 1263j), (-3290 - 1263j)], 'seismometer_gain': 1.01885, 'sensitivity': 427336.0, 'zeros': [] } self.assertEqual(paz, result)
def test_issue165(self): """ Test cases related to #165: - number of poles or zeros can be 0 - an unsupported response information somewhere in the metadata should not automatically raise an Error, if the desired information can still be retrieved """ parser = Parser(strict=True) file = os.path.join(self.path, "bug165.dataless") t = UTCDateTime("2010-01-01T00:00:00") parser.read(file) paz = parser.get_paz("NZ.DCZ.20.HNZ", t) result = {'digitizer_gain': 419430.0, 'gain': 24595700000000.0, 'poles': [(-981 + 1009j), (-981 - 1009j), (-3290 + 1263j), (-3290 - 1263j)], 'seismometer_gain': 1.01885, 'sensitivity': 427336.0, 'zeros': []} self.assertEqual(paz, result)
def test_issue_361(self): """ Test case for issue #361. """ filename = os.path.join(self.path, 'G.SPB.dataless') parser = Parser() parser.read(filename) # 1 - G.SPB..BHZ - no Laplace transform - works parser.get_paz('G.SPB..BHZ') # 2 - G.SPB.00.BHZ - raises exception because of multiple results self.assertRaises(SEEDParserException, parser.get_paz, 'G.SPB.00.BHZ') # 3 - G.SPB.00.BHZ with datetime - no Laplace transform - works dt = UTCDateTime('2007-01-01') parser.get_paz('G.SPB.00.BHZ', dt) # 4 - G.SPB.00.BHZ with later datetime works dt = UTCDateTime('2012-01-01') parser.get_paz('G.SPB.00.BHZ', dt)