Skip to content
Snippets Groups Projects
Commit c74a7f5b authored by Colm Talbot's avatar Colm Talbot
Browse files

add error raising if too few nodes are given to cubic spline

parent 7809b0c7
No related branches found
No related tags found
1 merge request!113Add calibration
Pipeline #
......@@ -73,6 +73,8 @@ class CubicSpline(Recalibrate):
number of spline points
"""
Recalibrate.__init__(self, prefix=prefix)
if n_points < 4:
raise ValueError('Cubic spline calibration requires at least 4 spline nodes.')
self.n_points = n_points
self.spline_points = np.logspace(np.log(minimum_frequency), np.log(maximum_frequency), n_points)
......
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