@@ -35,9 +35,9 @@ def smallest_difference(data_frame, comp_value, column_name):
3535
3636 Returns
3737 -------
38- Tuple(float, pd.Series or np.array or float )
38+ Tuple(float, float or pd.Series or np.array)
3939 Closest value to comparative value as float and its corresponding value
40- as float.
40+ as float, pd.Series or np.array .
4141
4242 """
4343 diff = []
@@ -53,15 +53,15 @@ def linear_extra_interpolation(data_frame, requested_height, column_name):
5353 Inter- or extrapolates between the values of a data frame.
5454
5555 This function can for example be used for the interpolation of a wind
56- speed, density or temperature.
56+ speed, density or temperature to calculated these values at hub height of a
57+ wind turbine.
5758
5859 Parameters
5960 ----------
6061 data_frame : DataFrame
6162 Indices are the values between which will be interpolated or from which
6263 will be extrapolated, the corresponding values are in the column
63- specified by `column_name` and they can be floats, pd.Series or
64- np.arrays.
64+ specified by `column_name` and can be floats, pd.Series or np.arrays.
6565 requested_height : float
6666 Height for which the interpolation takes place (e.g. hub height of wind
6767 turbine).
@@ -71,21 +71,21 @@ def linear_extra_interpolation(data_frame, requested_height, column_name):
7171
7272 Returns
7373 -------
74- interpolant : pandas.Series, numpy.array or float
74+ interpolant : float or pandas.Series or numpy.array
7575 Result of the interpolation (e.g. density at hub height).
7676
7777 Notes
7878 -----
7979
80- For the interpolation np.interp() is used and the following equation is
81- used for extrapolation:
80+ For the inter- and extrapolation the following equation is used:
8281
8382 .. math:: interpolant = (value_2 - value_1) / (height_2 - height_1) *
8483 (height_{requested} - height_1) + value_1
8584
8685 with:
87- :math:`height_2`: largest/smallest index of data frame,
88- :math:`height_1`: second largest/smallest index of data frame,
86+ :math:`height_2`: index of data frame closest to
87+ :math:`height_{requested}`, :math:`height_1`: index of data frame
88+ second closest to :math:`height_{requested}`,
8989 :math:`value_2`: corresponding value to `height_2`,
9090 :math:`value_1`: correponding value to `height_1`,
9191 :math:`height_{requested}` : height for which the interpolation takes
0 commit comments