Пример #1
0
 def test_norm_factor(self):
     """
     Test calculating norm_factor
     """
     obja = PAZ(poles=[6.228 + 6.228j, 6.228 - 6.228j],
                zeros=[0, 0],
                input_units='m/s',
                output_units='counts',
                ref_gain=1500.,
                ref_freq=1.)
     self.assertAlmostEqual(obja.norm_factor, 2.205, places=3)
     obja.input_units = 'nm'
     self.assertAlmostEqual(obja.calc_norm_factor(), 0.3509, places=3)
Пример #2
0
 def test_paz(self):
     """
     Test calculating amplitudes
     """
     obj = PAZ(poles=[6.228 + 6.228j, 6.228 - 6.228j],
               zeros=[0, 0],
               input_units='m/s',
               output_units='counts',
               ref_gain=1500.,
               ref_freq=1.)
     obj_nm = PAZ(poles=[6.228 + 6.228j, 6.228 - 6.228j],
                  zeros=[0, 0, 0],
                  input_units='nm',
                  output_units='counts',
                  ref_gain=9.42e-6,
                  ref_freq=1.)
     self.assertNotEqual(obj, obj_nm)
     self.assertAlmostEqual(obj.norm_factor, 2.205, places=3)
     obj.input_units = 'nm'
     self.assertAlmostEqual(obj.calc_norm_factor(), 0.3509, places=3)
     self.assertEqual(obj, obj_nm)