Пример #1
0
    def test_transform_sample_asinh(self):
        xform = transforms.AsinhTransform('asinh',
                                          param_t=10000,
                                          param_m=4.5,
                                          param_a=0)
        data1_sample.apply_transform(xform)

        self.assertIsInstance(data1_sample._transformed_events, np.ndarray)
Пример #2
0
    def test_inverse_asinh_transform():
        xform = transforms.AsinhTransform('asinh',
                                          param_t=10000,
                                          param_m=4.5,
                                          param_a=0)
        y = xform.apply(test_data_range1)
        x = xform.inverse(y)

        np.testing.assert_array_almost_equal(test_data_range1, x, decimal=10)
Пример #3
0
    def test_transform_sample_asinh(self):
        xform = transforms.AsinhTransform('asinh',
                                          param_t=10000,
                                          param_m=4.5,
                                          param_a=0)
        data1_sample.apply_transform(xform)

        raw_events = data1_sample.get_events(source='raw')
        xform_events = data1_sample.get_events(source='xform')

        self.assertIsInstance(xform_events, np.ndarray)
        self.assertRaises(AssertionError, np.testing.assert_array_equal,
                          raw_events, xform_events)