예제 #1
0
 def test_make_stats(self):
     """
     Check function make_stats.
     """
     with open(THREE_CHAN_FCNT, 'rb') as fi:
         stats = rc._make_stats(fi, 288, False, False)
     self.assertIsInstance(stats, obspy.core.trace.Stats)
     self.assertAlmostEqual(stats.sampling_rate, 500, delta=1e-5)
     self.assertEqual(stats.network, '1')
     self.assertEqual(stats.station, '1')
     self.assertEqual(stats.location, '1')
     self.assertEqual(stats.channel, 'DP3')
     self.assertEqual(stats.npts, 15000)
     self.assertEqual(stats.starttime,
                      UTCDateTime('2017-08-09T16:00:00.380000Z'))
     self.assertEqual(stats.endtime,
                      UTCDateTime('2017-08-09T16:00:30.378000Z'))
     with open(THREE_CHAN_FCNT, 'rb') as fi:
         stats = rc._make_stats(fi, 288, True, False)
     self.assertEqual(stats.channel, 'DPN')
예제 #2
0
 def test_make_stats(self):
     """
     Check function make_stats.
     """
     with open(THREE_CHAN_FCNT, 'rb') as fi:
         stats = rc._make_stats(fi, 288, False, False)
     self.assertIsInstance(stats, obspy.core.trace.Stats)
     self.assertAlmostEqual(stats.sampling_rate, 500, delta=1e-5)
     self.assertEqual(stats.network, '1')
     self.assertEqual(stats.station, '1')
     self.assertEqual(stats.location, '1')
     self.assertEqual(stats.channel, 'DP3')
     self.assertEqual(stats.npts, 15000)
     self.assertEqual(stats.starttime,
                      UTCDateTime('2017-08-09T16:00:00.380000Z'))
     self.assertEqual(stats.endtime,
                      UTCDateTime('2017-08-09T16:00:30.378000Z'))
     with open(THREE_CHAN_FCNT, 'rb') as fi:
         stats = rc._make_stats(fi, 288, True, False)
     self.assertEqual(stats.channel, 'DPN')