fenestration.sampling.interpolation_plot#
- fenestration.sampling.interpolation_plot(interpolated: ndarray, residuals: ndarray, pix: int | None = 0, val: float | None = None, x: Tensor | ndarray | None = None, full: ndarray | None = None) Figure#
Create plot showing interpolation results at specified pixel or value.
We have two subplots: the interpolation (with optional actual values) and the residuals
Either
pixorvalmust be set, and the other must beNone. They specify which interpolated function to display- Parameters:
interpolated – the array of functions interpolated to each pixel
residuals – the errors for each interpolation
pix – we plot the interpolated function centered at this pixel
val – we plot the interpolated function centered at this x-value
x – the 1d tensor/array passed to
check_sampling. Ifxis not set, default istorch.linspace(-5, 5, 101)as incheck_sampling.full – the array of functions centered at each pixel. If None, won’t plot. If not None, will plot as dashed line behind the interpolation for comparison
- Returns:
fig – figure containing the plot
- Raises:
ValueError – If
xis not setValueError – If neither
val_samplingnorpix_samplingare set toNone