Skip to content
Snippets Groups Projects
Commit 41b0494d authored by MoritzThomasHuebner's avatar MoritzThomasHuebner
Browse files

Added repr for Recalibrate base class

parent 4de5d633
No related branches found
No related tags found
1 merge request!170Resolve "Add more __repr__ methods"
......@@ -11,6 +11,11 @@ class TestBaseClass(unittest.TestCase):
def tearDown(self):
del self.model
def test_repr(self):
expected = 'Recalibrate(prefix={})'.format('recalib_')
actual = repr(self.model)
self.assertEqual(expected, actual)
def test_calibration_factor(self):
frequency_array = np.linspace(20, 1024, 1000)
cal_factor = self.model.get_calibration_factor(frequency_array)
......
......@@ -21,6 +21,9 @@ class Recalibrate(object):
self.params = dict()
self.prefix = prefix
def __repr__(self):
return self.__class__.__name__ + '(prefix={})'.format(self.prefix)
def get_calibration_factor(self, frequency_array, **params):
"""Apply calibration model
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment