pvpltools.iec61853.BilinearInterpolator#
- class pvpltools.iec61853.BilinearInterpolator(matrix)[source]#
Bilinear interpolation and extrapolation of a matrix of values.
The values in the matrix are measurements at various combinations of irradiance and temperature. The matrix may be completely filled, or there may be missing values at high irradiance/low temperature, or at low irradiance/high temperature combinations. These are filled in using the method described in [1], which ensures a continuous interpolation/extrapolation surface.
- Parameters:
matrix (pandas.DataFrame) – The row index of matrix must contain irradiance values and the column index of matrix must contain temperature values. The data in the dataframe can represent anything, but will usually be PV module efficiency. This can be relative or absolute, as fraction or percent.
Notes
This class is implemented as a subclass of scipy.interpolate.RegularGridInterpolator. Essentially it ensures the regular grid is completely filled, as required, and that the appropriate options are selected. It also provides some domain-specific documentation.
Example
>>> eta = pd.DataFrame(index=[1000, 1100], ... columns=[15, 25], ... data=[[ 22.0, 20.0], ... [np.nan, 19.0]]) >>> eta 15 25 1000 22.0 20.0 1100 NaN 19.0 >>> interpolate_eta = BilinearInterpolator(eta) >>> interpolate_eta.values array([[22., 20.], [21., 19.]]) >>> interpolate_eta([900, 1100], [25, 15]) array([21., 21.])
References
Author: Anton Driesse, PV Performance Labs
Methods
__init__(matrix)