예제 #1
0
 def test_convert_units(self):
     """
     Should convert header units to plot units.
     """
     fig = plt.figure()
     ax = fig.add_subplot(111)
     splt = SEGYPlotManager(ax, self.segy)
     # should correctly perform unit conversions for distance
     splt.DISTANCE_UNIT = 'km'
     self.assertEqual(splt._convert_units('offset', [1000]), [1])
     # should correctly perform unit conversions for time
     splt.TIME_UNIT = 's'
     self.assertEqual(splt._convert_units('delay', [1000]), [1])