Skip to content
Snippets Groups Projects
Commit 4de5d633 authored by MoritzThomasHuebner's avatar MoritzThomasHuebner
Browse files

Created repr for the cubic spline

parent 1944b80b
No related branches found
No related tags found
1 merge request!170Resolve "Add more __repr__ methods"
......@@ -75,8 +75,14 @@ class CubicSpline(Recalibrate):
if n_points < 4:
raise ValueError('Cubic spline calibration requires at least 4 spline nodes.')
self.n_points = n_points
self.minimum_frequency = minimum_frequency
self.maximum_frequency = maximum_frequency
self.spline_points = np.logspace(np.log10(minimum_frequency), np.log10(maximum_frequency), n_points)
def __repr__(self):
return self.__class__.__name__ + '(prefix={}, minimum_frequency={}, maximum_frequency={}, n_points={})'\
.format(self.prefix, self.minimum_frequency, self.maximum_frequency, self.n_points)
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