drift.util.plotutil

Functions

regrid_polar(polar_img, r_bins, theta_bins)

Regrid an (r, theta) quarter plane onto (rx, ry).

drift.util.plotutil.regrid_polar(polar_img, r_bins, theta_bins, res=1024)

Regrid an (r, theta) quarter plane onto (rx, ry).

Useful for breaking out (k, theta) Fisher errors into (kpar, kperp).

Parameters:
  • polar_img (np.ndarray[num_r, num_theta]) – The values on the polar grid.

  • r_bins (np.ndarray[num_r + 1]) – The bin boundaries in the r direction.

  • theta_bins (np.ndarray[num_theta + 1]) – The bin boundaries in the theta direction.

  • res (integer, optional (default=1024)) – The number of pixels on each side of the cartesian grid.

Returns:

cart_img – The regridded image.

Return type:

np.ndarray[res, res]