qblox_scheduler.analysis.visualization.plot_interpolation#

Plot interpolations.

Functions#

areas(ip)

scale(points, xy_mean, xy_scale)

unscale(points, xy_mean, xy_scale)

interpolate_heatmap(x, y, z[, n, interp_method])

The output of this method can directly be used for plt.imshow(z_grid, extent=extent,

Module Contents#

areas(ip)[source]#
scale(points, xy_mean, xy_scale)[source]#
unscale(points, xy_mean, xy_scale)[source]#
interpolate_heatmap(x, y, z, n: int | None = None, interp_method: Literal['linear', 'nearest', 'deg'] = 'linear')[source]#

The output of this method can directly be used for plt.imshow(z_grid, extent=extent, aspect=’auto’) where the extent is determined by the min and max of the x_grid and y_grid.

The output can also be used as input for ax.pcolormesh(x, y, Z,**kw)

Parameters:
  • x (numpy.ndarray) – x data points

  • y (numpy.ndarray) – y data points

  • z (numpy.ndarray) – z data points

  • n – number of points for each dimension on the interpolated grid if set to None will auto determine amount of points needed

  • interp_method – determines what interpolation method is used.

Returns:

x_gridnumpy.ndarray

N*1 array of x-values of the interpolated grid

y_gridnumpy.ndarray

N*1 array of x-values of the interpolated grid

z_gridnumpy.ndarray

N*N array of z-values that form a grid.